Description Usage Arguments Examples
Jettison names or indices of a list and retain everything else (including names).
1 | list_remove(mylist, element)
|
mylist |
A list object that has superfluous elements. |
element |
A vector (either character or numeric) of elements to drop from 'mylist'. |
1 2 3 4 5 6 7 | testlist <- list('first' = c(1:3), 'second' = 2, 'third' = c(4:9), 'last' = 'hello')
list_remove(mylist = testlist, element = c('first', 'third'))
$second
[1] 2
$last
[1] "hello"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.