encode: Encode using run-length encoding

Description Usage Arguments Value Note See Also Examples

Description

Encode using run-length encoding

Usage

1
2
3
4
5
6
7
encode(x, ...)

## S4 method for signature 'DataFrame'
encode(x)

## S4 method for signature 'Ranges'
encode(x)

Arguments

x

Object.

...

Additional arguments.

Value

Modified object. All atomic columns will be encoded to Rle S4 class.

Note

Updated 2021-06-09.

See Also

Rle().

Examples

1
2
3
4
5
6
7
8
9
## DataFrame ====
binary <- seq(from = 0L, to = 1L)
df <- DataFrame(
    a = rep(x = binary, times = 50L),
    b = rep(x = binary, each = 50L)
)
lapply(df, class)
x <- encode(df)
lapply(x, class)

acidgenomics/pipette documentation built on Sept. 27, 2021, 9:10 a.m.