Skip to content
Prev 177112 / 398503 Next

how to index statements provided as function args?

On 15/04/2009 6:31 AM, Dan Kelley wrote:
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

Duncan Murdoch

  What I'm trying to do is to provide the ability to add elements