[Bioc-devel] Sweave changes (keep.source = TRUE or FALSE?)

Duncan Murdoch murdoch at stats.uwo.ca
Wed Dec 6 19:56:24 CET 2006

On 12/6/2006 1:37 PM, Kevin R. Coombes wrote:
> Hi,
> I don't really think anyone believes that the parse&deparse behavior was 
> exactly a "feature". Instead, I think the primary issue is one of 
> backwards compatibility.
> You are proposing to change the behavior of Sweave in a manner that will 
> cause old code to break. Here "break" has two meanings. Some automatic 
> development tools will stop working on existing valid code.  In 
> addition, existing valid code will produce results that differ from what 
> they produced previously.

I'm not sure what you're thinking of here.  Could you give examples of

I think you're talking about my change that puts source code in place of
deparsed code rather than Fritz's stylepath change.  The intention of
the deparsed code has been that it parses to the same thing as the
original code did, so I don't see how you will get different results.
The code will print differently, but will have identical meaning; is
that what concerns you?

> To deal with this, you are going to add an option that will allow users 
> to get the old behavior.  However, you propose to set the default value 
> of the option to require users to go back and modify all their old code 
> in order to prevent things from breaking. It seems obvious to me that 
> the default behavior should be the one that does not break old code or 
> require the editing of old code in order to get the old behavior.
> The reason I use Sweave (for virtually every analysis I do any more) is 
> that I can guarantee that when I can go back to the code six months from 
> now, I can regenerate the analysis and I can regenerate the 
> documentation, and I know that I will get the same results. 

But you don't have a guarantee that you will get identical formatting,
because the deparser in R might change its formatting, the functions you
use might change their formatting, LaTeX might change its formatting,
etc.  With the keep.source=TRUE option, you'll be at least guaranteed
that your source won't change again.

Duncan Murdoch

Changing the
> default behavior of Sweave violates that guarantee, since the 
> documentation will not be identical to what it was before. Personally, I 
> am willing to pay the cost with NEW analyses to invoke the new behavior 
> explicitly (which I do agree is the preferred behavior) because I think 
> the goal of backwards compatibility is more important.
> In other words, I disagree with your characterization of the 
> parse&deparse behavior as a "bug".  It did not cause incorrect results 
> in the documentation or the code, and everyone using Sweave knew about 
> the behavior.
> Best,
> 	Kevin
> Friedrich Leisch wrote:
>>>>>>> On Tue, 05 Dec 2006 15:27:02 +0000,
>>>>>>> Wolfgang Huber (WH) wrote:
>> [...]
>> IMO R must be allowed to change, but if possible it should be easy to
>> protect yourself against changes when possible. I always considered
>> the parse&deparse behavior of Sweave a bug for which I had no simple
>> solution (and am somewhat surprised that there are people who think it
>> is a feature). So now that the bug is fixed, it would be natural for
>> me to make that available as default.
>> [...]
>> Best,
>> Fritz
>> _______________________________________________
>> Bioc-devel at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel

More information about the Bioc-devel mailing list