On 12/6/06, Friedrich Leisch <friedrich.leisch@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.

  Whether keep.source is TRUE or FALSE needs to be honored on either a per
document (or more realistically per chunk) basis. And so that is what R CMD
build is going to need to deal with appropriately.

  Some options may of course be such that a global switch is fine, but if
you do it via options then some package authors may feel that they have a
right to set the options for their package - this is one reason why global
options are seldom that good of an idea.

2) Have something like
>         R CMD Sweave --opts "additional args passed to Sweave() call"
>    to be able to override it even from the shell.



  Again, I just don't see how this is a good idea. Every document needs to
have its own explicit handling instructions for all chunks. It makes no
sense to let me process the document differently from what the author wants
or requires.

  The only thing that is up for grabs is the default setting - what to do it
nothing is specified.
Documents that want that need specify nothing, everyone else has to modify
their document to explicitly state handling instructions.  If something is
specified, at either the document or chunk level it ought to be honored. The
idea that different people might decide to process it differently seems not
very useful to me.



If BioC decides to default to keep.source=FALSE and stylepath=TRUE
> then it will not be necessary to touch any existing vignettes. R CMD
> check and build currently run R --vanilla and hence ignore the stuff in
> 1), so will need changes there, too. But nothing that's not doable,
> I'll give it a shot over Christmas break.
>
> Best,
> Fritz
>
>
>
>


-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
rgentlem@fhcrc.org

	[[alternative HTML version deleted]]

