Description Value Slots Methods Examples
List containing elements of the same class or inheritance.
A TypedList
object
.Data
list
of internal contents. Elements must match or inherit a common class
(Inherited from list
)
elem.class
character
representing the class related to the elements
Constructors
typed.list(..., elem.class = NA_character_)
Creates a TypedList from the elements in ...
derived from the class elem.class
Conversion and coercion
as.list(x, ...)
Converts this object to list
as.typed.list.list(x, elem.class = NA_character_)
Converts a list
to a TypedList
if its elements inherit the same type
as.typed.list(x, elem.class = NA_character_)
Coerces a TypedList
to support the inherited class indicated by elem.class
as.typed.list.vector(x, elem.class = NA_character_)
Converts a vector to a TypedList
Properties
x[i, j, ...] <- value
Sets a value to this list. The value
argument must be compatible to the current list type
1 2 3 4 5 6 7 | ## Creates a TypeList that stores list-derived objects
tpls = typed.list(A=list(1L:5L),
B=data.frame(v1=LETTERS[1L:10L]),
elem.class = 'list')
# Note: The 'elem.class' above is optional, since the
# class is automatically detected from the first argument
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.