[R] how to index statements provided as function args?

Dan Kelley kelley.dan at gmail.com
Wed Apr 15 13:21:35 CEST 2009


That works perfectly.  Thanks very much!!


Duncan Murdoch-2 wrote:
> 
> On 15/04/2009 6:31 AM, Dan Kelley wrote:
>> Is there a way to specify a *vector* of statements, as an argument to a
>> function. 
> 
> There are several ways.  expression() converts its arguments into a 
> vector of expressions, e.g.
> 
>  > e <- expression(cat("a\n"), cat("b\n"))
>  > e[[1]]
> cat("a\n")
>  > eval(e[[1]])
> a
> 

-- 
View this message in context: http://www.nabble.com/how-to-index-statements-provided-as-function-args--tp23056258p23057076.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list