Re: [Rd] Retrieving an unevaluated argument

2006-02-01 Thread Liaw, Andy
Why isn't substitute(x, parent.frame()) enough? parse(deparse()) seems redundant... Andy From: hadley wickham > > I'm trying to retrieve an unevalated argument (a list in particular). > I can do this easily when I call the function directly: > > a1 <- function(x) match.call()$x > > > a1(list

[Rd] Retrieving an unevaluated argument

2006-02-01 Thread hadley wickham
I'm trying to retrieve an unevalated argument (a list in particular). I can do this easily when I call the function directly: a1 <- function(x) match.call()$x > a1(list(y=x^2)) list(y = x^2) But when the function is called by another function, it gets trickier b <- function(x, f) f(x) > b(lis