list_filter | R Documentation |
Filter a list.
list_filter(in_list, filter_fun)
in_list |
The list to filter. |
filter_fun |
The function to use for filtering. |
'filter_fun' must evaluate to TRUE or FALSE for filtering, where elements returning TRUE are kept.
A list, 'in_list' but filtered according to 'filter_fun.'
my_list <- list(aa = 1:3, bb = 1:4, cc = 2:5) list_filter(my_list, function(x) min(x) == 1) list_filter(my_list, function(x) max(x) > 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.