compress.rle: Compress the 'rle' object by merging adjacent runs

Description Usage Arguments Note Examples

View source: R/rle_utils.R

Description

Compress the rle object by merging adjacent runs

Usage

1
2
## S3 method for class 'rle'
compress(x, ...)

Arguments

x

an rle object.

...

additional objects; if given, all arguments are concatenated.

Note

Since rle stores run lengths as integers, compress.rle will not merge runs that add up to lengths greater than what can be represented by a 32-bit signed integer (\Sexpr{.Machine$integer.max}).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14

rle documentation built on Jan. 13, 2021, 6:17 p.m.