SimpleList-class

SimpleList objects

The (non-virtual) SimpleList class extends the List virtual class.

Keywords
classes, methods
Details

The SimpleList class is the simplest, most generic concrete implementation of the List abstraction. It provides an implementation that subclasses can easily extend.

In a SimpleList object the list elements are stored internally in an ordinary list.

Accessors

Same as for List objects. See the List man page for more information.

Coercion

All the coercions documented in the List man page apply to SimpleList objects.

Subsetting

Same as for List objects. See the List man page for more information.

Looping and functional programming

Same as for List objects. See ?`List-utils` for more information.

Displaying

When a SimpleList object is displayed, the "Simple" prefix is removed from the real class name of the object. See classNameForDisplay for more information about this.

See Also

  • Listobjects for the parent class.
  • TheCompressedListclass defined in theIRangespackage for a more efficient alternative to SimpleList.
  • TheSimpleIntegerListclass defined in theIRangespackage for a SimpleList subclass example.
  • TheDataFrameclass for another SimpleList subclass example.

Aliases
  • class:SimpleList
  • SimpleList
  • SimpleList-class
  • length,SimpleList-method
  • names,SimpleList-method
  • names<-,SimpleList-method
  • as.list,SimpleList-method
  • coerce,ANY,SimpleList-method
  • coerce,list,List-method
  • c,SimpleList-method
  • lapply,SimpleList-method
  • endoapply,SimpleList-method
  • mendoapply,SimpleList-method
  • classNameForDisplay,SimpleList-method
Examples
## Displaying a SimpleList object:
x1 <- SimpleList(a=letters, i=Rle(22:20, 4:2))
class(x1)

## The "Simple" prefix is removed from the real class name of the
## object:
x1

library(IRanges)
x2 <- IntegerList(11:12, integer(0), 3:-2, compress=FALSE)
class(x2)

## The "Simple" prefix is removed from the real class name of the
## object:
x2

## This is controlled by internal helper classNameForDisplay():
classNameForDisplay(x2)
Documentation reproduced from package S4Vectors, version 0.10.1, License: Artistic-2.0

Community examples

Looks like there are no examples yet.