Skip to contents

Decode data that uses run-length encoding

Usage

decode(x, ...)

# S4 method for DFrame
decode(x, j = NULL)

# S4 method for Ranges
decode(x)

Arguments

x

Object.

j

vector. Column names or positions to evaluate.

...

Additional arguments.

Value

Modified object. Columns will be decoded and no longer Rle class.

Note

Updated 2023-09-20.

Examples

data(DFrame, package = "AcidTest")

## DFrame ====
object <- DFrame
object <- encode(object)
lapply(object, class)
#> $genotype
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#> 
#> $treatment
#> [1] "Rle"
#> attr(,"package")
#> [1] "S4Vectors"
#> 
object <- decode(object)
lapply(object, class)
#> $genotype
#> [1] "factor"
#> 
#> $treatment
#> [1] "factor"
#>