list_select | R Documentation |
Select parts of a list.
list_select(in_list, ...)
in_list |
The list to select from. |
... |
The selection, can both be names and numeric positions. |
'list_select()' lets you select parts of a list either by position or by name. Names can be supplied as bare variable names and do not need to be supplied as strings or otherwise be quoted.
Elements are returned in the order they are given, this is useful if you want to reorder elements in a list. You can also rename while selecting, writing your selection like 'new_name = old_name'.
A list of the selected elements.
my_list <- list(a = c(1, 2), b = c(3, 4), c(5, 6)) list_select(my_list, a, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.