Skip to content

Not loading libraries

3 messages · Fredrik Karlsson, Brian Ripley

#
Dear list,

I have a bunch of libraries that are automatically loaded when I start
the R environment. How do I remove them?

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
....

/Fredrik
#
On Wed, 10 Aug 2005, Fredrik Karlsson wrote:

            
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.

  
    
#
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:
$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: