[R] Changing default library

Achim Zeileis Achim.Zeileis at wu-wien.ac.at
Wed Jul 11 11:47:18 CEST 2007


Corinna:

> I got a question concerning the .libPaths(). if I do the command
> .libPaths() than the result is /usr/lib/R/library. This is the default
> folder. I now want to change this one into /home/csc/usr/lib/R/library.
> I thought it would work with the command
> .libPaths("/home/csc/usr/lib/R/library"). When I than do the command
> .libPaths() the result is: "/usr/lib/R/library"
> "/home/csc/usr/lib/R/library". But if I start R the next time the result
> of the command .libPaths() is again just "/usr/lib/R/library".
>
> Can anyone help me?

You should set the R_LIBS environment variable (that the man page of
.libPaths points you to). See also FAQ 5.2.

hth,
Z



More information about the R-help mailing list