Class "rleDiff" of rle(diff(.)) Stored Vectors
rleDiff-class.RdClass "rleDiff" is for compactly storing long vectors
which mainly consist of linear stretches. For such a vector
x, diff(x) consists of constant stretches
and is hence well compressable via rle().
Objects from the Class
Objects can be created by calls of the form new("rleDiff", ...).
Currently experimental, see below.
Note
This is currently an experimental auxiliary class
for the class abIndex, see there.
Examples
showClass("rleDiff")
#> Class "rleDiff" [package "Matrix"]
#>
#> Slots:
#>
#> Name: first rle
#> Class: numeric rle
ab <- c(abIseq(2, 100), abIseq(20, -2))
ab@rleD # is "rleDiff"
#> RLE difference (class 'rleDiff'): first = 2, "rle":
#> Run Length Encoding
#> lengths: num [1:3] 98 1 22
#> values : num [1:3] 1 -80 -1