Hallo R experts, 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? Thanks, Corinna [[alternative HTML version deleted]]
Hi,> 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".>From libPaths help page :,---- | The library search path is initialized at startup from the environment | variable R_LIBS (which should be a colon-separated list of directories | at which R library trees are rooted) by calling .libPaths with the | directories specified in R_LIBS. `---- HTH, Julien -- Julien Barnier Groupe de recherche sur la socialisation ENS-LSH - Lyon, France
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