[R] libPaths how to change (R 3.0.2 64bit, RStudio 0.98.501, Windows 7)
Jeff Newmiller
jdnewmil at dcn.davis.CA.us
Wed Feb 26 10:18:45 CET 2014
What you are really asking is how environment variables get set outside of R, which is very OS-specific and not on topic here, and there can be numerous ways for it to happen even on a single OS. I will warn you that the path syntax can vary in Windows depending on where it gets set so beware of ~ expansion (doesn't always work) and forward/back-slash distinctions. You can start looking in the System control panel under Advanced and Environment Variables... you will probably need Admin privileges to go there. Google is your friend.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On February 25, 2014 10:57:00 AM PST, "Lopez, Dan" <lopez235 at llnl.gov> wrote:
>R Experts,
>
>I had a problem when trying to install package tm. The install looked
>successful ("Package 'tm' successfully unpacked and MD5 sums checked")
>but I could not load it through
>library(tm). It kept complaining that tm package was not installed.
>
>So it was through this problem that I realized I had two locations
>where my packages are stored:
>C:R/R-3.0.2/library #Preferred
>\\\\lab.gov/users/lopez/Data/documents/R/win-library/3.0 #NOT
>Preferred
>
>I am not sure when and how the second location was created. But now I
>want to change my default location to the "Preferred" location.
>
>I referred to
>http://stat.ethz.ch/R-manual/R-devel/library/base/html/libPaths.html
>but I don't understand how to set the environment variables R_LIBS or
>R_LIBS_SITE, which is what I understood I need to do. I looked in
>R\R-3.0.2\etc and did not find a Renviron file (per
>http://mathematicalcoffee.blogspot.com/2013/04/getting-rstudio-to-include-your.html).
>So I created one (file name exactly as "Renviron") and set the variable
>(R_LIBS_USER=~/R/library) there but when I do the following I still see
>both library paths:
> > .libPaths()
>[1] "\\\\lab.gov/users/lopez/Data/documents/R/win-library/3.0"
>"C:/R/R-3.0.2/library"
>
>I only want the preferred path. How do I remove the unwanted path?
>
>BTW I did find a solution to installing tm properly but want to prevent
>similar problem from happening in the future by only having one library
>path.
>
>Dan Lopez
>Workforce Analyst
>HRIM - Workforce Analytics & Metrics
>Strategic Human Resources Management
>(925) 422-0814
>
>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list