Let's define:
f <- function(x) deparse(substitute(x))
The challenge: find <something>
so that f(<something>)
returns "abc"
. Excluding, of course, f(abc)
.
With "tidy NSE", i.e. quasiquoting, this is very easy. However, according to the NSE references (1, 2, 3), it is impossible since substitute
is a pure quoting (as opposed to quasiquoting) function.
I wonder if there is anything obscure or undocumented (not that uncommon!) that allows to unquote in substitute
, hence the challenge.