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

Friedrich Leisch friedrich.leisch at stat.uni-muenchen.de
Thu Dec 7 12:26:06 CET 2006


>>>>> On Wed, 6 Dec 2006 19:24:39 -0800,
>>>>> Robert Gentleman (RG) wrote:

  > On 12/6/06, Friedrich Leisch <friedrich.leisch at stat.uni-muenchen.de> wrote:
  >> 
  >> >>>>> On Tue, 05 Dec 2006 15:23:24 -0500,
  >> >>>>> Duncan Murdoch (DM) wrote:
  >> 
  >> > Right, that's what we want to do.  But I want an easier way for
  >> someone
  >> > with an existing document to get the old behaviour.
  >> 
  >> 
  >> My plan would be the following:
  >> 
  >> 1) Set the default of all Sweave options via options(), such that it
  >> can be changed in the Rprofile of a site-wide installation or in a
  >> user's ~/.Rprofile file or even on a per-directory basis. This will
  >> also result in R CMD build reading the desired defaults.



  >   I guess I don't see how this would work, or just what value there would be
  > in it. Typically global options are useful for things that are entirely
  > under the control of the user.
  >   For Sweave, I hope that all attributes are directly under the control of
  > the author. The user must respect the choices of the author to see the
  > document as intended and so I guess I am missing how this idea would be of
  > any use.


Yes, I thought so, too, that's why you currently can set defaults for
the options within a document using \SweaveOpts{}, but not for an R
session using options(). That was a design choice, not just oversight.

But then somebody told me it cannot be expected from authors to insert
a single line into their document and we need a solution where 200
vignettes of a certain project, where the vignettes are built
centrally, could be controlled without touching the documents. Well,
if I don't change the documents, I have to change the configuration of
the machines where the vignettes are built.

But I must admit I am tired of this discussion, I never anticipated
how much resistance something would provoke where I think it really is
a feature, and I'll leave the defaults as they are now. It's not too
hard to program emacs to insert an \SweaveOpts{keep.source=TRUE} into
every .Rnw file I start to write.

But what I do anticipate is that we will have a lot of fun developing
R beyond what it is now, because obviously we are at a point where we
are no longer allowed to improve it, when that means breaking
backwards compatibility. Finally one of the main curses of commercial
software has reached us.

Note: I got only one serious email (the one by Deepayan I'll answer in
a minute) that keep.source=FALSE produces better looking documents in
some cases, and that's a discussion I like.  All other complaints
where simply of the form "we can't change it because it has always
been the way that it is". I thought that rule is not necessarily true
in a research project like R.

.f



More information about the Bioc-devel mailing list