How can I pass a character vector using NSE:
fun <- function(x){
x_ <-deparse(substitute(x))
print(x_)
}
fun_ <- function(x){
do_something(x)
}
For example,
fun(x= a, b, c)
should print interpret the argument to x
as a vector c(a, b, c) and pass a character vector to fun_(x)
:
fun_(x=c("a", "b", "c"))
There are additional parameters as well.