Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Rle-class-leftovers

Rle objects (old man page)


Description

IMPORTANT NOTE - 7/3/2014: This man page is being refactored. Most of the things that used to be documented here have been moved to the man page for Rle objects located in the S4Vectors package.

Coercion

In the code snippets below, from is an Rle object:

as(from, "IRanges"): Creates an IRanges instance from a logical Rle. Note that this instance is guaranteed to be normal.

as(from, "NormalIRanges"): Creates a NormalIRanges instance from a logical Rle.

General Methods

In the code snippets below, x is an Rle object:

split(x, f, drop=FALSE): Splits x according to f to create a CompressedRleList object. If f is a list-like object then drop is ignored and f is treated as if it was rep(seq_len(length(f)), sapply(f, length)), so the returned object has the same shape as f (it also receives the names of f). Otherwise, if f is not a list-like object, empty list elements are removed from the returned object if drop is TRUE.

findRange(x, vec): Returns an IRanges object representing the ranges in Rle vec that are referenced by the indices in the integer vector x.

splitRanges(x): Returns a CompressedIRangesList object that contains the ranges for each of the unique run values.

See Also

The Rle class defined and documented in the S4Vectors package.

Examples

x <- Rle(10:1, 1:10)
x

IRanges

Foundation of integer range manipulation in Bioconductor

v2.24.1
Artistic-2.0
Authors
H. Pagès, P. Aboyoun and M. Lawrence
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.