rlepack: Hybrid Index, rle-pack utilities

Description Usage Arguments Value Author(s) See Also Examples

View source: R/rle.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
rlepack(x, ...)
## S3 method for class 'integer'
rlepack(x, pack = TRUE, ...)
rleunpack(x)
## S3 method for class 'rlepack'
rleunpack(x)
## S3 method for class 'rlepack'
rev(x)
## S3 method for class 'rlepack'
unique(x, incomparables = FALSE, ...)
## S3 method for class 'rlepack'
anyDuplicated(x, incomparables = FALSE, ...)

Arguments

x

in 'rlepack' an integer vector, in the other functions an object of class 'rlepack'

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

Author(s)

Jens Oehlschl<c3><a4>gel

See Also

hi, intrle, rle, rev, unique

Examples

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

OHDSI/bit documentation built on May 9, 2017, 3:30 p.m.