Skip to contents

Decode data that uses run-length encoding

Usage

decode(x, ...)

# S4 method for DataFrame
decode(x)

# S4 method for Ranges
decode(x)

Arguments

x

Object.

...

Additional arguments.

Value

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

Note

Updated 2022-02-04.

Examples

data(DataFrame, package = "AcidTest")

## DataFrame ====
object <- DataFrame
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"
#>