From john.maindonald at anu.edu.au  Fri Feb  4 01:11:54 2011
From: john.maindonald at anu.edu.au (John Maindonald)
Date: Fri, 4 Feb 2011 13:11:54 +1300
Subject: [Rd] keep.source when semicolons separate statements on the one
	line; PS
Message-ID: <966372B7-299F-4BD5-8C23-0C962C356668@anu.edu.au>

I forgot to add the sessionInfo() information:

> sessionInfo()
R version 2.12.1 Patched (2011-01-22 r54081)
Platform: x86_64-pc-mingw32/x64 (64-bit)
. . .


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



[Rd] keep.source when semicolons separate statements on the one line; PS
John Maindonald