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
 8
 9
10
encode(x, ...)

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

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

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

Arguments

x

Object.

...

Additional arguments.

Value

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

Note

Updated 2019-07-20.

See Also

S4Vectors::Rle().

Examples

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

acidgenomics/transformer documentation built on Jan. 9, 2020, 11:34 a.m.