RleListToRleMatrix: RleListToRleMatrix

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

a wrapper to create a RleMatrix from a RleList object.

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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))

DEScan2 documentation built on Nov. 8, 2020, 5:01 p.m.