Installing R packages - Would you like to use a personal library instead?

Hello. Recently I've faced a problem, connected with installing packages in R. For example, I type:

install.packages("lmtest")

and receive the following notification:

Would you like to use a personal library instead?
I answer No and get:


Warning in install.packages :
  'lib = "C:/Program Files/R/R-4.0.2/library"' is not writable
Error in install.packages : unable to install packages

What to do in such a situation? How to answer the question? What will it influence?

1 Like

That folder is the system level package library, you need to run Rstudio as "administrator" to be able to install there.

If you are the only user on that particular computer, I find using the system level package library less prone to installation issues, but if there are more users sharing the same machine is better to use a personal library instead, the only consideration is that your windows user name must not contain non-ASCII characters or empty spaces, otherwise it is not going to work.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.