as ‘lib’ is unspecified

R packages always be installed the library path of /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6 , when I installed a package use install.packages() method. But I found the drive of host is 126G, and the /opt/R is 64G avail but we don't have the permission to install the package in, and the path of /home/rstudio-user/R is only 2.7G. So can i change the library path of R library to install packages, thanks for your time.

You can specify you libpath each time you install with something like install.packages("tidyverse", lib = "/usr/lib/R/library") or you can set libpath globally in your Rprofile.site file e.g. .libPaths(c("/usr/local/lib/R/site-library", "/usr/local/lib/R/library"))

Thanks your reply for my problem.
The errors are below:

install.packages("tidyverse", lib = "/usr/lib/R/library")
Warning in install.packages :
'lib = "/usr/lib/R/library"' is not writable
Would you like to use a personal library instead? (yes/No/cancel) no
Error in install.packages : unable to install packages
.libPaths()
[1] "/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6"
[2] "/opt/R/3.6.0/lib/R/library"
install.packages("tidyverse", lib = "/opt/R/3.6.0/lib/R/library")
Warning in install.packages :
'lib = "/opt/R/3.6.0/lib/R/library"' is not writable

Would you like to use a personal library instead? (yes/No/cancel)

So I think this problem about permission. but packages from CRAN by use install.packages() and from Bioconductor by use BiocManager::install(), it always be installed to /home/rstudio-user/R. and the space is only 2.7G. I want to know that others rstudio cloud project is same as mine. and thank you for time and reply.

This is Rstudio Cloud project host drives information.

DeepinScreenshot_select-area_20190621094731

Sorry but I can't understand what you are saying, if you are trying to change the libpath on "Rstudio Cloud" service then this is not possible, if you are talking about your own server on a cloud computing service then you just have to set proper permissions.

Thank you for your advice.Last result information of "df -h" run on "RStudio Cloud", not on my own server. I will try your advice to resolution the problems.Thanks !

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.