On 25/04/2012 10:20 AM, Liviu Andronic wrote:
On Wed, Apr 25, 2012 at 3:41 PM, Duncan Murdoch
<murdoch.dun...@gmail.com>  wrote:
>  I would use the last method, or if the calls were truly repetitive (i.e.
>  always identical, not just the same pattern), use a named chunk.
>
Labeled chunks are indeed what I was looking for [1]. As far as I
understand, this is what "Sweave functions" (or are these macros?)
look like:

Yes.  They're definitely macros, not functions:  pure text substitution.

Duncan Murdoch


<<>>=
d<- iris
ind<- 1:2
@

<<sw>>=
   summary(d[ , ind])
   cor(d[ , ind])
@

<<>>=
d<- iris
ind<- 2:4
<<sw>>
@


Regards
Liviu

[1] vignette('Sweave', 'utils')

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to