[R] A 'sweave' strange problem !!!

Stéphane Dray dray at biomserv.univ-lyon1.fr
Fri Nov 11 16:24:40 CET 2005


Hello list,
I have found a problem (bug?) with Sweave. I hope that someone could 
help me.
Try this little example :
\documentclass[a4paper]{article}

\title{toto}
\author{toto}

\begin{document}

\maketitle



<<ni1, fig=T, eval=TRUE, echo=TRUE, debug=TRUE, results=verbatim, 
include =FALSE, width=7, height=7>>=
a<-rnorm(1)+1
a
plot(1:10)
@
patati


<<ni2, fig=F, eval=TRUE, echo=TRUE, debug=TRUE, results=verbatim, 
include =FALSE, width=7, height=7>>=
a
@
\end{document}

The value of 'a' has change between the two Schunks. It seems that the 
problem only appear when there are plot (fig=T) in the first one. 
Without plot, there are no problems: a remains unchanged. Is it a bug or 
have I misundertsood something ?

Thanks a lot !
R version 2.1.0 (Debian).

-- 
Stéphane DRAY (dray at biomserv.univ-lyon1.fr )
Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - Lyon I
43, Bd du 11 Novembre 1918, 69622 Villeurbanne Cedex, France
Tel: 33 4 72 43 27 57       Fax: 33 4 72 43 13 88
http://www.steph280.freesurf.fr/




More information about the R-help mailing list