I know that dplyr
select has the ability to subset a dataset using column names without quotation marks:
function (.data, ...)
{
UseMethod("select")
}
I would like to do something similar, but instead of subsetting, I want the function to create a vector. Something like:
var_select <- function (...) {
UseMethod("select")
}
vector <-var_select(cyl, disp, hp)
> vector
[1] "cyl""disp""hp"
What would be the correct syntax for this?