[Rd] Source references from the parser

Duncan Murdoch murdoch at stats.uwo.ca
Tue Nov 28 04:52:04 CET 2006


On 11/27/2006 7:56 PM, Seth Falcon wrote:
> Hi Duncan, all,
> 
> Duncan Murdoch <murdoch at stats.uwo.ca> writes:
>> This is now committed.
>>
>> I used keep.source, exactly the same as the option() that controls this 
>> behaviour in other places.
>>
>> I decided to set the default to TRUE.  This means vignettes will all 
>> look different in R-devel.  
> 
> I'd really like the default to be FALSE, at least for the upcoming
> release.  As you note, the change will cause vignettes to look
> different.  There are over 260 vignettes in the BioC source tree and
> given that most developers have little extra time, I would rather they
> not have to review these docs because of this change.

The next release hasn't been scheduled, but it's likely to be 2.4.1, 
sometime in December.  These changes won't be in that release.  They're 
in R-devel, which will become 2.5.0 sometime in April.

I'd rather leave the default as TRUE for now, and make a final decision 
on it sometime near when the alpha test period starts in February or 
early March.  If the default is set to FALSE now, then it won't get 
tested, and I'd much rather hear about bugs in the implementation before 
release, rather than after.

I'd also like to know if the \SweaveOpts line below fails on any 
systems, and whether there's an easier way to turn the option off. 
(I've tested it in R 2.4.0 patched, but not in older systems.)  If it is 
compatible with all old versions, then a sed script to insert it into 
all 260 of your vignettes would be pretty easy to write; the main cost 
would then be to replace the current package versions with new versions 
containing this change.  How many packages are we talking about, that 
wouldn't otherwise be updated before April?

My inclination would be to default to TRUE in the long term, on the 
basis that doing nothing to the user's code should be the default, 
rather than the option.  The fact that this changes the look of 
documents from existing packages is obviously an argument in favour of a 
FALSE default.  So the final decision hasn't been made yet.


>> The simplest way to get the previous 
>> appearance is to put in
>>
>> \SweaveOpts{keep.source=FALSE}
>>
>> but in most cases I think people will want the new behaviour.  It's only 
>> bad if the code was badly formatted or contained comments you don't want 
>> to show up in the final document.
> 
> I'm glad the feature is there, I think it is desirable.  I hope to
> turn this option on when I write new documents ;-)

Duncan Murdoch



More information about the R-devel mailing list