The Rle class is a general container for storing an atomic vector that is stored in a run-length encoding format. It is based on the rle function from the base package.

decode(x, ...)

# S4 method for DataFrame
decode(x)

# S4 method for Ranges
decode(x)

# S4 method for SummarizedExperiment
decode(x)

Arguments

x

Object.

...

Additional arguments.

Value

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

Note

Updated 2019-07-20.

See also

Examples

data(RangedSummarizedExperiment, package = "acidtest") rowData <- SummarizedExperiment::rowData ## DataFrame ==== df <- rowData(RangedSummarizedExperiment) lapply(df, class)
#> $broadClass #> [1] "Rle" #> attr(,"package") #> [1] "S4Vectors" #> #> $description #> [1] "Rle" #> attr(,"package") #> [1] "S4Vectors" #> #> $entrezID #> [1] "list" #> #> $geneBiotype #> [1] "Rle" #> attr(,"package") #> [1] "S4Vectors" #> #> $geneID #> [1] "Rle" #> attr(,"package") #> [1] "S4Vectors" #> #> $geneIDVersion #> [1] "Rle" #> attr(,"package") #> [1] "S4Vectors" #> #> $geneName #> [1] "Rle" #> attr(,"package") #> [1] "S4Vectors" #> #> $seqCoordSystem #> [1] "Rle" #> attr(,"package") #> [1] "S4Vectors" #>
x <- decode(df) lapply(x, class)
#> $broadClass #> [1] "factor" #> #> $description #> [1] "character" #> #> $entrezID #> [1] "list" #> #> $geneBiotype #> [1] "character" #> #> $geneID #> [1] "character" #> #> $geneIDVersion #> [1] "character" #> #> $geneName #> [1] "character" #> #> $seqCoordSystem #> [1] "character" #>
## SummarizedExperiment ==== ## This works on rowData and colData. x <- decode(RangedSummarizedExperiment) lapply(rowData(x), class)
#> $broadClass #> [1] "factor" #> #> $description #> [1] "character" #> #> $entrezID #> [1] "list" #> #> $geneBiotype #> [1] "character" #> #> $geneID #> [1] "character" #> #> $geneIDVersion #> [1] "character" #> #> $geneName #> [1] "character" #> #> $seqCoordSystem #> [1] "character" #>