[Rd] options(keep.source = TRUE) -- also for "library(.)" ?

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Fri, 28 Apr 2000 10:26:47 +0200 (CEST)


>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch> writes:

(and I haven't seen more feedback..)

>>>>> "PD" == Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:
     PD> Martin Maechler <maechler@stat.math.ethz.ch> writes:

	>>> Can we [those of us who know how sys.source() works...]  think of
	>>> changing this?  As it was possible for the base package, it must be
	>>> doable for the others as well....

     PD> Martin, surely you could have figured out to remove these two lines
     PD> from sys.source:

     PD> oop <- options(keep.source = FALSE)
     PD> on.exit(options(oop))

    MM> [blush... *BLUSH* ...
    MM> I didn't look at sys.source(); 
    MM> just knew that parts of it used to look rather "magical" to me ..
    MM> ]

    MM> Of course we now could even make 
    MM> keep.source = getOption("keep.source") 
    MM> an argument to library(), being propagated to sys.source(..).

I'm considering to commit the necessary changes and add the following to
NEWS [for "R-devel"]

    o	library(), require(), and sys.source() have a new argument
	` keep.source = getOption("keep.source") '.
	Hence, by default, functions from all packages (not just base)
	`keep their source'.

Is this okay for everyone ?


     PD> The real question is whether we want to have a different mechanism
     PD> for controlling whether keep.source is set or not. 

    MM> right.

      PD> Originally it was FALSE for the base library to save space, and
      PD> according the same setting was used for other libraries since some
      PD> of them are rather large, but later it got flipped to TRUE for
      PD> base,
    MM> (yes, I'm still wondering...)
      PD> and then there is little point in setting it FALSE for packages. 
      PD> Question is whether anyone would want the old behaviour
      PD> back to get more space for analyses?

    MM> would be nice if it *was* configurable for base as well;
    MM> possibly both via cmd line option
    MM> (something like --keepsource / --no-keepsource )
    MM> and a setting in Rprofile..

    >> From grepping through the source code, I don't see how it was turned off
    MM> for base...

anyone [R-core] ?

Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._