powered by
A pipe-friendly wrapper around list[(names(list) %in% names].
list[(names(list) %in% names]
cmd_list_keep_named(list, names)
an R list
vector of names to keep
list keeping only items defined by names
This function is slightly faster than using cmd_list_keep() to keep items by name.
cmd_list_keep()
# NOT RUN { cmd_list_keep_named(list("a" = 1, "b" = 2), "a") # }
Run the code above in your browser using DataLab