I want to wrap a function which takes an expression as its argument.
For example:
f <- function(expr1) {
substitute(expr1)
}
f({Sys.time()})
The result will be
>f({Sys.time()})
{
Sys.time()
}
However, if I wrap a function g
over f
:
g <- function(expr2) {
f(expr2)
}
Then the result becomes
>g({Sys.time()})
expr2
What should I do to make the wrapped result unchanged?
Thanks.