S4 Object To Implement Base List Methods

Internal unitizer objects used to manage lists of objects. The only user facing instance of these objects are conditionList objects. For the most part these objects behave like normal S3 lists. The list contents are kept in the .items slot, and the following methods are implemented to make the object mostly behave like a standard R list: [, [[, [<-, [[<-, as.list, append, length, names, and names<-.


The underlying assumption is that the `.items` slot is a list (or an expression), and that slot is the only slot for which it's order and length are meaningful (i.e. there is no other list or vector of same length as `.items` in a different slot that is supposed to map to `.items`). This last assumption allows us to implement the subsetting operators in a meaningful manner.

The validity method will run validObject on the first, last, and middle items (if an even number of items, then the middle closer to the first) assuming they are S4 objects. We don't run on every object to avoid potentially expensive computation on all objects.



a list or expression


integer, used for implementing iterators


logical used to track what direction iterators are going

See Also


  • unitizerList
new('unitizerList', .items=list(1, 2, 3))
# }
Documentation reproduced from package unitizer, version 1.4.5, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.