A pipe-friendly wrapper around list[(names(list) %in% names]
.
cmd_list_keep_named(list, names)
list | an R list |
---|---|
names | 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.
#> $a #> [1] 1 #>