Description Usage Arguments Details Value Examples
Take the literal text input for a comma separated list of arguments and treat it as list of column names in a dplyr function.
1 |
... |
a comma separated list of arguments to be treated as column names. |
The most common usage of this is to pass '...', from your function directly through to dplyr functions as column names, as in the 'select_these' example.
This function must be prefixed with '!!!' to treat the output as a list.
something that will resolve to a list of column names when prefixed with '!!!'
1 2 3 4 5 6 7 | ## Not run:
select_these <- function(dat, ...){
select(dat, !!!treat_inputs_as_cols(...))
}
select_these(mtcars, cyl, wt)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.