From krc at mdacc.tmc.edu  Thu Mar 15 18:58:45 2007
From: krc at mdacc.tmc.edu (krc at mdacc.tmc.edu)
Date: Thu, 15 Mar 2007 18:58:45 +0100 (CET)
Subject: [Rd] Sweave bug using 'FDR' in chunk label (PR#9567)
Message-ID: <20070315175845.6E07A5A6A0@slim.kubism.ku.dk>

Full_Name: Kevin Coombes
Version: 2.4.0
OS: Windows XP
Submission from: (NULL) (143.111.22.24)


I'm running R 2.4.0 on a Windows XP machine, with only the default packages
loaded.

Running Sweave or Stangle on the following Rnw file:
--------------
% bug.Rnw
\begin{document}
Demonstrate an Sweave/Stangle bug.
<<info>>=
sessionInfo()
@ 

<<getFDR>>=
x <- 1
@ 
<<getFDX>>=
y <- 2
@ 
<<problem>>=
<<getFDX>>
<<getFDR>>
@ 

\end{document}
---------------

produces an error message:

> Stangle("bug.Rnw")
Writing to file bug.R 
Warning message:
reference to unknown chunk 'getFDR' in: Sweave(file = file, driver = driver,
...) 


Here is the relevant part of the "bug.R" file produced by Stangle.  Note that
the label has been truncated on chunk2 (should be getFDR) but is not affected on
chunk3. Also note that chunk4 has not been expanded properly.

###################################################
### chunk number 2: getF
###################################################
x <- 1

###################################################
### chunk number 3: getFDX
###################################################
y <- 2

###################################################
### chunk number 4: problem
###################################################
y <- 2



[Rd] Sweave bug using 'FDR' in chunk label (PR#9567)
krc at mdacc.tmc.edu