SimpleList-class           package:IRanges           R Documentation

Simple and Compressed List Classes

Description:

     The (non-virtual) SimpleList and (virtual) CompressedList classes
     extend the Sequence virtual class.

Details:

     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.

Constructor:

     The SimpleList class constructor is used to create SimpleList
     objects:


      'SimpleList(...)': takes possibly named objects as elements for
          the new SimpleList object.


Coercion:

     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.


Subsetting:

     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.


Looping:

     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.


Author(s):

     P. Aboyoun

See Also:

     Sequence, AtomicList and RangesList for example implementations

Examples:

     SimpleList(a = letters, ranges = IRanges(1:10, 1:10))

