From rpeng at jhsph.edu  Sat Apr  7 13:56:40 2007
From: rpeng at jhsph.edu (Roger Peng)
Date: Sat, 07 Apr 2007 07:56:40 -0400
Subject: [Rd] bug in Stangle(split=TRUE)
Message-ID: <461786F8.9040105@jhsph.edu>

[I originally emailed this to Friedrich Leisch but got no response and I 
just wanted to make sure it made it in before release.]

While working with Stangle(), I noticed a problem when using 'split = 
TRUE'.  Particularly, when there are two chunks where one chunk's name 
is a prefix of another chunk's name, then the two chunks will be written 
to a single file rather than two separate files (if the chunk who's name 
is a prefix comes after the other chunk).  Running 'Stangle(split=TRUE)' 
with the attached 'test1.Rnw' file should reproduce the problem.

I think it boils down to a partial matching problem in 'RtangleRuncode'. 
  I've attached a patch against R-alpha (r41020) which I think fixes 
this problem but I'm not sure it's necessarily the best approach (there 
are other instances of this construction in the code).

-roger
-- 
Roger D. Peng  |  http://www.biostat.jhsph.edu/~rpeng/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sweave.patch
Url: https://stat.ethz.ch/pipermail/r-devel/attachments/20070407/ba6232d3/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test1.Rnw
Url: https://stat.ethz.ch/pipermail/r-devel/attachments/20070407/ba6232d3/attachment-0001.pl 


[Rd] bug in Stangle(split=TRUE)
Roger Peng