SimpleList-class {IRanges} | R Documentation |
The (non-virtual) SimpleList and (virtual) CompressedList classes extend the Sequence virtual class.
The SimpleList and CompressedList classes provide an implementation that subclasses can easily extend. The underlying storage in a SimpleList subclass is a list object. The underlying storage in a CompressedList object is a virtually partitioned vector-like object. For more information on the available methods, see the Sequence man page.
The SimpleList class constructor is used to create SimpleList objects:
SimpleList(...)
: takes possibly named objects as elements
for the new SimpleList object.
In the following code snippets, x
is a SimpleList or CompressedList
object.
as.list(x)
: Copies the elements of x
into a new R
list object.
unlist(x, recursive = TRUE, use.names = TRUE)
: Concatenates
the elements of x
into a single elementType(x)
object.
In the following code snippets, x
is a SimpleList or CompressedList
object.
x[i]
:
In addition to normal usage, the i
parameter can be a
RangesList
, logical RleList
, LogicalList
, or
IntegerList
object to perform subsetting within the list
elements rather than across them.
x[i] <- value
:
In addition to normal usage, the i
parameter can be a
RangesList
, logical RleList
, LogicalList
, or
IntegerList
object to perform subsetting within the list
elements rather than across them.
seqselect(x, start=NULL, end=NULL, width=NULL)
:
In addition to normal usage, the start
parameter can be a
RangesList
, logical RleList
, LogicalList
, or
IntegerList
object to perform sequence extraction within the
list elements rather than across them.
seqselect(x, start=NULL, end=NULL, width=NULL) <- value
:
In addition to normal usage, the start
parameter can be a
RangesList
, logical RleList
, LogicalList
, or
IntegerList
object to perform sequence replacement within the
list elements rather than across them.
In the following code snippets, x
is a SimpleList or CompressedList
object.
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.
P. Aboyoun
Sequence, AtomicList and RangesList for example implementations
SimpleList(a = letters, ranges = IRanges(1:10, 1:10))