[R] library(): load library from a specified location

Jannis bt_jannis at yahoo.de
Tue Mar 30 13:01:07 CEST 2010


Dear list memmbers,


I would like to load a R library from a specified folder with library()
and need help on how to call the command.

The reason is that I am loading this library on a remote machine where I
  have no admin rights. Furthermore a library with the same name is
already installed on that machine. I have modified this library slightly
by modifying the source code and created a "personal" version of this
library that I now want to load instead of the standart one.

Running:

R CMD INSTALL 'path*/*packagename* --library=*path*/Software/R-packages


i managed to compile my modified version on the remote machine and save
the library in a folder on that machine.


When I now start R and run

library(packagename)


R still seem to load the version installed on the remote computer, even 
though
i added my folder to the library path of R by running:

.libPaths("*path*/Software/R-Packages")

Probably this is due to the fact that the package is also available in 
the standart library of R.
Ist there any way of loading the Package from only one specified path? I 
read the help for library() and could imagine that lib.loc could be the 
key to sucess but am not sure which argument it needs?


Thanks a lot
Jannis



More information about the R-help mailing list