Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

14
  • 29
    Definitely the proper solution. The only catch is if your user is not a admin (likely the case if you're having this problem to begin with), you have to change your environment variables via Control Panel->User Accounts->User Accounts->Change my environment variables.
    – David Moye
    Commented Mar 2, 2015 at 16:46
  • 1
    Do you (happen to) know the equivalent in Linux command line?
    – Diego-MX
    Commented Apr 8, 2015 at 22:39
  • 11
    Sure, just set these as your shell variables (in bash you can edit .bash_profile and/or .bashrc). See here: unix.stackexchange.com/questions/117467/… For setting these for current session only type in console export R_LIBS_USER='directory_of_your_choice' Commented Apr 9, 2015 at 10:43
  • Magic solution! this worked perfect to me in RStudio with Windows7
    – Darwin PC
    Commented Apr 24, 2015 at 0:39
  • 7
    instead of setting the variable through control panel, I have modified the default value of R_LIB_USER in the Rprofile file. Here the solution: I came up with a similar approach, the solution is presented in as a solution to this question stackoverflow.com/questions/31707941/…
    – Marco
    Commented Mar 7, 2017 at 8:52