Message-ID: <23057076.post@talk.nabble.com>
Date: 2009-04-15T11:21:35Z
From: Dan Kelley
Subject: how to index statements provided as function args?
In-Reply-To: <49E5C21F.5080802@stats.uwo.ca>
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.