I'm using hosted RStudio on linux centos. When I try to install packages I get a non zero exit status error. I've already installed R-devel.
From reading the output to r console when trying to install packages it looks my user cannot access the default library path.
I read this SO post about adding a new library directory and even making it the default one.
Within RStudio GUI, in the bottom right pane I created a new directory "mylibs".
I tried adding to libPaths() per the SO post:
.libPaths( c( .libPaths(), "~/mylibs") )
Then I typed .libPaths()
.
.libPaths()
[1] "/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.4"
[2] "/usr/lib64/R/library"
[3] "/usr/share/R/library"
So it looked like that failed. I wondered if I had not specified the correct directory. So, in RStudio I typed getwd()
which shows that I'm in "/home/rstudio"
. So, I then tried: .libPaths( c( .libPaths(), "~/home/rstudio/mylibs") )
However, when I checked .libPaths()
there was no change, the same 3 shown above.
How can I add mylibs dir to .libPaths() so that I can download and install packages?