Description Usage Arguments Value Author(s) See Also Examples
Filter an object to only contained elements with desired .names
.
1 | keep_if_named(x, .names)
|
x |
A named R object. |
.names |
|
Those elements of x
whose name is in .names
.
Brendan Knapp brendan.g.knapp@gmail.com
1 2 3 4 5 | library(salinasr)
ages <- c(Tom = 20, Mary = 19, Sue = 43, Joe = 62)
ages
keep_if_named(ages, c("Mary", "Sue"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.