[Rd] Converting an unevaluted list to list of unevaluted elements

hadley wickham h.wickham at gmail.com
Thu Feb 2 01:16:11 CET 2006


Thanks to Andy Liaw, I have realised my problem isn't getting an
unevaluated argument, my problem really is converting an unevaluted
list to list of unevaluted elements.  That is, how can I go from

substitute(list(a=x, b=c))

to

list(a=substitute(x), b=substitute(c))


(I am also interested in a general means of getting the "correct"
unevaluated argument. ie, what should a be to always return list(x=1)
for these functions:
b <- function(x) a(x)
c <- function(x) b(x)
d <- function(x) c(x)

a(list(x=1))
b(list(x=1))
c(list(x=1))
d(list(x=1))
)

Thanks, as always, for your help

Hadley



More information about the R-devel mailing list