I want to capture the incoming arguments that I'm passing to a function. How can I do this? The function below isn't quite what I want. The output I want is "Using mtcars and am". I was under the impression rlang could help with this, but I haven't been able to find a function to get the job done.
fx_capture<- function(fx_data, fx_var) {
name_data <- quote(fx_data)
name_var <- quote(fx_var)
paste("Using", name_data, "and", name_var)
}
fx_capture(mtcars, am)
> "Using fx_data and fx_var"