RleListToRleMatrix {DEScan2} | R Documentation

## RleListToRleMatrix

### Description

a wrapper to create a RleMatrix from a RleList object.

### Usage

    RleListToRleMatrix(RleList, dimnames = NULL)

### Arguments

`RleList` | an RleList object with all elements of the same length.
`dimnames` | the names for dimensions of RleMatrix (see DelayedArray pkg).

### Value

a RleMatrix from DelayedArray package.

### Examples

    library("DelayedArray")
    lengths <-  c(3, 1, 2)
    values <- c(15, 5, 20)
    el1 <- S4Vectors::Rle(values=values, lengths=lengths)

    el2 <- S4Vectors::Rle(values=sort(values), lengths=lengths)

    rleList <- IRanges::RleList(el1, el2)
    names(rleList) <- c("one", "two")
    (rleMat <- RleListToRleMatrix(rleList))

[Package DEScan2 version 1.0.0 Index]