rlepack {bit} | R Documentation |
Basic utilities for rle packing and unpacking and apropriate methods for rev
and unique
.
rlepack(x, pack = TRUE) rleunpack(x) ## S3 method for class 'rlepack' rev(x) ## S3 method for class 'rlepack' unique(x, incomparables = FALSE, ...)
x |
an integer vector |
pack |
FALSE to suppress packing |
incomparables |
just to keep R CMD CHECK quiet (not used) |
... |
just to keep R CMD CHECK quiet (not used) |
A list with components
first |
the first element of the packed sequence |
dat |
either an object of class |
last |
the last element of the packed sequence |
Only for sorted input unique.rlepack(rlepack(x))
will be the same as rlepack(unique(x))
, furthermore rlepack(unique(x))
is faster.
Therefore we only use unique.rlepack
only where we have rlepack format from hi
Jens Oehlschlägel
x <- rlepack(rep(0L, 10))