[R] Question about contributed packages

Rolf Turner r.turner at auckland.ac.nz
Mon Jan 19 04:12:45 CET 2009


On 19/01/2009, at 3:14 PM, Murray Cooper wrote:

> I am working on a methodology for qualifying R, for GLP and GCP.
>
> If I quailfy only the base R install, with no contributed packages, it
> seems relatively simple to qualify R. However, from time to time I
> will want to use a contributed package. If I use a contributed  
> package,
> does it leave anything behind that will be loaded with the next  
> invocation
> of R?
>
> Suppose I run R and use a contributed package and then exit.
> Next time I want to run R, for GLP work and will only use base R.
> Can I be sure I am only working with base R?
> Or do I need to maintain two installations of R, one for use
> with GLP/GCP and one for when I want to use contributed packages?
>
> I hope this is clear.

You can make sure that no after-effects are left by

	(a) *not* saving your workspace when you quit from R
or	(b) removing (or moving) the saved copy (.RData) before
	    starting your new session
or	(c) starting your new session with the --no-restore-data flag
or	(d) possibly a few other things.

I.e. the only after effects that a contributed package might leave are
of the form of objects in a saved workspace.

I guess *theoretically* a contributed package could effect changes to  
base R
or to other contributed packages via, say, the system() function.   
However
this would run into permissions blocks on most systems, and at any  
rate would
be unacceptable to the R community and I expect that if a package  
were discerned
to do such things it would be removed from CRAN.  I am as certain as  
I am of
anything that no package currently on CRAN would do such a thing.

It seems to me that it should be possible to build a check for such  
unacceptable
behaviour into ``R CMD check''.  Would it be paranoiac to do so?

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}



More information about the R-help mailing list