adj.rle: Adjacent Values Run Length Encoding

Description Usage Arguments Value Author(s) References

View source: R/utils.R

Description

Similar to rle function, this function detects "runs" of adjacent integers, and displays vector of run lengths and list of corresponding integer sequences.

Usage

1

Arguments

x

a numeric vector with

Value

a list with two elements: vector of run lengths, and another list of values corresponding to generated sequences' lengths.

Author(s)

Gabor Grothendieck <[email protected]>

References

See original thread for more details http://stackoverflow.com/a/8467446/457898. Special thanks to Gabor Grothendieck for this one!


rapportools documentation built on May 29, 2017, 11:01 a.m.