Try this:

cl <- as.list(match.call())


On 10/13/05, hadley wickham <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to get ...as a list of unevaluated arguments, ie.
> substitute(list(...)) gives me an unevaluated list of the arguments,
> but I want a list of the unevaluated arguments.
>
> My attempts so far:
>
> (function(...) substitute(...))(a=1, b=a)  # Only returns first
>
> (function(...) substitute(list(...)))(a=1, b=a) # Unevaluated list,
> not list of unevaluated
>
> (function(...) expression(...))(a=1, b=a)
>
> (function(...) eval(expression(...)))(a=1, b=a)  # Error in eval(expr,
> envir, enclos) : ... used in an incorrect context
>
> (function(...) substitute(expression(...), list(...)))(a=1, b=a) #
> Error in (function(...) substitute(expression(...), list(...)))(a = 1,
>  : Object "a" not found
>
> What I actually want: list(1, a)
>
> Can anyone offer any suggestions?
>
> Thanks,
>
> Hadley
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to