Choosing install library for package

How do i choose the library which the package is install in in Rstudio?

When i run "install and restart" i get this error:

  • installing to library 'C:/Program Files/R/R-4.0.0/library'
    Error: ERROR: no permission to install to directory 'C:/Program Files/R/R-4.0.0/library'

Exited with status 1.

I want it to install on "h:/r_packages"

install.packages has a lib= argument;

You can configure your R session to use your library path by default by setting the R_LIBS_USER environment variable.

See ?libPaths() to know more

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