f <- function(q, ...) {
env = parent.frame()
# match.call() best called in function context.
captured_call <- match.call()
captured_args <- bquote_call_args(captured_call, env)
captured_args
}
z <- "x"
y <- 5
qv <- 3
# equivalent to f(3, x = 5)
f(.(qv), .(z) := .(y))
# equivalent to f(q = 7)
qname <- 'q'
f(.(qname) := 7)
Run the code above in your browser using DataLab