Learn R Programming

IRanges (version 2.0.1)

List-class-leftovers: List objects (old man page)

Description

IMPORTANT NOTE - 9/4/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 List objects located in the S4Vectors package.

Arguments

Details

The only thing left here is the documentation of the stack and aggregate methods for List objects. In the code snippets below, x is a List object.

stack(x, index.var = "name", value.var = "value"): As with stack on a list, constructs a DataFrame with two columns: one for the unlisted values, the other indicating the name of the element from which each value was obtained. index.var specifies the column name for the index (source name) column and value.var specifies the column name for the values.

aggregate(x, by, FUN, start = NULL, end = NULL, width = NULL, frequency = NULL, delta = NULL, ..., simplify = TRUE)): In addition to normal usage, the by parameter can be a RangesList to aggregate within the list elements rather than across them. When by is a RangesList, the output is either a SimpleAtomicList object, if possible, or a SimpleList object, if not.

See Also

Examples

Run this code
starts <- IntegerList(c(1, 5), c(2, 8))
ends <- IntegerList(c(3, 8), c(5, 9))
rgl <- IRangesList(start=starts, end=ends)
rangeDataFrame <- stack(rgl, "space", "ranges")

Run the code above in your browser using DataLab