From murdoch.duncan at gmail.com  Fri Feb  4 14:56:31 2011
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Fri, 04 Feb 2011 08:56:31 -0500
Subject: [Rd] keep.source when semicolons separate statements on the one
 line
In-Reply-To: <48B94A4D-DB81-4912-850B-CDB2D7711968@anu.edu.au>
References: <48B94A4D-DB81-4912-850B-CDB2D7711968@anu.edu.au>
Message-ID: <4D4C058F.1050304@gmail.com>

Thanks for the report.  I'll take a look.

I'm now past one major time sink, and will have some time to catch up on 
old problems; I'll add this to that list.

Duncan Murdoch

On 03/02/2011 7:09 PM, John Maindonald wrote:
> The following is 'semicolon.Rnw'
>
> >  \SweaveOpts{engine=R, keep.source=TRUE}
> >
> >  <<xycig-A, eval=f, echo=f>>=
> >  library(SMIR); data(bronchit); library(KernSmooth)
> >  @ %
> >
> >  Code for panel A is
> >  <<code-xycig-A, eval=f, echo=t>>=
> >  <<xycig-A>>
> >  @ %
>
> Sweave("semicolon") yields the following 'semicolon.tex'
>
> >  Code for panel A is
> >  \begin{Schunk}
> >  \begin{Sinput}
> >>  library(SMIR); data(bronchit); library(KernSmooth)
> >>  library(SMIR); data(bronchit); library(KernSmooth)
> >>  library(SMIR); data(bronchit); library(KernSmooth)
> >  \end{Sinput}
> >  \end{Schunk}
>
> (I have omitted three blank lines at the start)
>
> With keep.source=FALSE, the commands are split onto
> separate lines, and there is no repetition.
>
> John Maindonald             email: john.maindonald at anu.edu.au
> phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
> Centre for Mathematics&  Its Applications, Room 1194,
> John Dedman Mathematical Sciences Building (Building 27)
> Australian National University, Canberra ACT 0200.
> http://www.maths.anu.edu.au/~johnm
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] keep.source when semicolons separate statements on the one line
Duncan Murdoch