[R] Not loading libraries

Fredrik Karlsson dargosch at gmail.com
Wed Aug 10 15:19:59 CEST 2005


Dear list,

I'm sorry about not providing all the necessary details. The R call is: 

"library(tools); Sweave(\"$*.Rnw\")" | R --no-save -q

Using the --vanilla switch, I am able to keep the libraries  from
loading, but since I need some of the datasets in the .RData file, my
call to Sweave fails.
I have not been able to find loading of libraries in an ,Rprofile, and
my options contains this:

> options("defaultPackages")
$defaultPackages
[1] "datasets"  "utils"     "grDevices" "graphics"  "stats"     "methods"  

Prof. Ripley is right when assuming that the libraries are loaded
because of me trying out the Rcmdr GUI and then doing a save.image().
What I did not know was that I managed to  save the loading of
libraries at the same time. This is what I would like to undo.

/Fredrik




On 8/10/05, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> On Wed, 10 Aug 2005, Fredrik Karlsson wrote:
> 
> > I have a bunch of libraries that are automatically loaded when I start
> > the R environment. How do I remove them?
> 
> By undoing what you did to get them there.
> 
> `make' is not the usual way to start R: try R --vanilla and see what
> happens (probably none of this).  Then read ?Startup and try just 'R'.
> 
> My guess is that has something to do loading Rcmdr afer having set R to
> run with no default packages, but we have no evidence of how you ran R.
> 
> > Output:
> > fredrik at theodor:~/dokument/Thesis/Book$ make
> > Making file voicing.tex from voicing.Rnw
> > Loading Tcl/Tk interface ... done
> > Loading required package: tcltk
> > Loading required package: rgl
> > Loading required package: zoo
> > Loading required package: strucchange
> > Loading required package: sandwich
> > Loading required package: relimp
> > Loading required package: nnet
> > Loading required package: graphics
> > Loading required package: grDevices
> > Loading required package: stats
> > Loading required package: nlme
> > Loading required package: mvtnorm
> > Loading required package: multcomp
> > Loading required package: mgcv
> > This is mgcv 1.3-1
> > Loading required package: MASS
> > Loading required package: lmtest
> > Loading required package: lattice
> > Loading required package: grid
> > Loading required package: foreign
> > Loading required package: effects
> > Loading required package: car
> > Loading required package: abind
> >> library(tools); Sweave("voicing.Rnw")
> > ....
> 
> --
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>




More information about the R-help mailing list