select_any_of | R Documentation |
Safely select elements of a named object (like a named R list).
select_any_of(x, elements)
x |
A object with |
elements |
A vector of strings with the name of the elements to search for; |
This functions works in a similar way to dplyr::any_of()
. It tries
to select any element of x
that is in the vector given by the user
in the elements
argument.
In other words, if the user gives the vector c("a", "c", "e")
, select_any_of()
will search for elements "a", "c" and "e" in the x
object, and will select
any of these elements if it finds them.
But dplyr::any_of()
is designed to work with columns of a data.frame,
and figma::select_any_of()
is designed to work specially with elements of a
named list (although it can be used to select columns of a data.frames as well).
A subset of the x
if it finds any of the elements described in the
element
argument.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.