rle-package {rle} | R Documentation |
The rle
Package
Description
Common base
and stats
methods for rle
objects, aiming to make it possible to treat
them transparently as vectors.
History
This package grew out of the needs of the ergm
package for a
run-length encoded representation of extremely long vectors with a
small number of contiguous runs, and these functions were originally
implemented in the statnet.common
package.
It has been split out into its own package to enable others to use this functionality without installing any unnecessary dependencies and to facilitate contributions under a simplified license.
What works and what doesn't
The long-run aim of this package is to make it possible to treat
rle
objects transparently as unnamed vectors. As of this
writing, the biggest unimplemented feature are:
The indexing (
[
and[[
) operators. It is not possible to extract or replace individual elements of the vector represented by anrle
object, though it is possible to access its underlying representation (i.e.,$lenths
and$values
) by name using any of the above operators or the$
operator.Method
rep.rle
currently has limited functionality.