Description Usage Arguments Details Value Examples
View source: R/myBasicFunctions.R
Extract multiple elements from a list
1 | subsetByNamesOrIndices(bigList, templNames)
|
bigList |
a list from where elements will be extracted |
templNames |
a vector containing indices or names of the element to extract |
The name of the output list will match the name of the bigList
even if the indices were used.
A list containing only the elements named in templNames
or whose indices are in templNames
from bigList
1 2 3 | l<-list('a'=c(1,3),'b'=letters[1:10],'c'="fun")
subsetByNamesOrIndices(l,1:2)
subsetByNamesOrIndices(l,c("a", "c"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.