rle2: Run Length Encoding

Description Usage Arguments Value

Description

This is a faster version of base R function rle. Returns matrix where first column is value, second column is length. For optimal speed, use integer = TRUE if x is an integer vector and integer = FALSE otherwise. Compatible with logical vectors (use integer = TRUE) but replaces TRUE/FALSE with 1/0; not compatible with character vectors.

Usage

1

Arguments

x

Integer, numeric, or logical vector.

integer

Logical value for whether x is an integer vector.

Value

Integer or numeric matrix.


vandomed/crowdopt documentation built on May 26, 2019, 5:35 a.m.