rlepack {ff}R Documentation

Hybrid Index, rle-pack utilities

Description

Basic utilities for rle packing and unpacking and apropriate methods for rev and unique.

Usage

rlepack(x, pack = TRUE)
rleunpack(x)
rev.rlepack(x)
unique.rlepack(x, incomparables = FALSE, ...)

Arguments

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)

Value

A list with components

first the first element of the packed sequence
dat either an object of class rle or the complete input vector x if rle-packing is not efficient
last the last element of the packed sequence

Note

Only for sorted input unique.rlepack(relpack(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

Author(s)

Jens Oehlschlägel

See Also

hi, intrle, rle, rev, unique

Examples

  x <- rlepack(rep(0L, 10))

[Package ff version 2.0.0 Index]