Consider this code
fn = function(...) {
# print the content of ... without evaluation?
}
I want the output of fn(a = b)
to be "a = b"
and fn(a = gn(b), 3~b~a, dd, e = 2 + f, h = hn(jn(cdf)))
to be list("a=gn(b)", "3~b~a", "dd", "e=2+f", "h= hn(jn(cdf)))"
.
I can't seem to find the right NSE function for it. I prefer Base R so I understand the process better. The closest I got was this
fn = function(...) {
res = rlang::enexprs(...)
paste0(names(res), ifelse(names(res)=="",names(res) , "=") , sapply(res, capture.output))
}