On 25/04/2012 10:20 AM, Liviu Andronic wrote:
> On Wed, Apr 25, 2012 at 3:41 PM, Duncan Murdoch
> <murdoch.duncan_at_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')
This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.
Archive generated by hypermail 2.2.0, at Wed 25 Apr 2012 - 15:40:31 GMT.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.