| [,simList,character,ANY-method | R Documentation |
simList but with subset of objectsThis is copies the non-object components of a simList (e.g., events, etc.)
then selects only the objects listed in i using Copy(mget(i, envir(sim)))
and adds them to the returned simList.
## S4 method for signature 'simList,character,ANY'
x[i, j, ..., drop = TRUE]
x |
A |
i |
A character vector of objects to select. |
j |
Not used. |
... |
Not used. |
drop |
Not used. |
The [ method returns a complete simList class with all the slots
copied from the original, but only the named objects in i are returned.
Eliot McIntire
s <- simInit()
s$a <- 1
s$b <- 2
s$d <- 3
s[c("a", "d")] # a simList with only 2 objects
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.