I am using an iMac at work that I inherited from a former coworker who already installed R as well as a number of packages before leaving. My problem is that although I can install new packages from inside R-Studio, I cannot update them. I have a separate user account from my former coworker; my account has admin privileges and I expect my former coworker's account did too. When I launch R or R-Studio, I believe it is running from a directory somewhere on their account because I ran this command to see where packages were being installed:
> Sys.getenv("R_LIBS_USER")  "~/Library/R/3.3/library"
...and found that this path does not exist under my account but does exist under the account of my former coworker. When I try to update already-installed packages, this happens:
> install.packages("shiny") trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/shiny_1.0.0.tgz' Content type 'application/x-gzip' length 2693218 bytes (2.6 MB) ================================================== downloaded 2.6 MB Error in install.packages : cannot remove prior installation of package ‘shiny’
I know that if I were to re-install R and R-Studio, it would create all the necessary support directories under my account but I am reluctant to delete my co-workers instance of R because I know that they have scripts and analyses on their account that might need to be re-run at some point and I would like to preserve the environment as much as possible. So my question is: how do I install a new instance of R under my account and make it the default instance of R for my user account?
In case its relevant: I'm using an iMac from late 2013 I'm running OSX Yosemite 10.10.5