Installing R Packages Issue

Hi,

I am receiving this error message from R Studio when trying to install any package. I have tried multiple fixes from different articles but still no luck. I have the latest version of R, R Studio, and Rtools and I am running this on Windows 10.

Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="//home.ghc.org/home$/nguytp2": Access is denied

Try to create the folder for user own package library, then R will install packages there:

dir.create(Sys.getenv("R_LIBS_USER"), recursive=TRUE)

After this you'll need to restart R.

1 Like

Hi Gabor,

Would this be within the Rprofile text? In this article?

https://medium.com/@ValidScience/how-to-fix-rstudios-package-installation-on-windows-10-c1e602bf3a1f

No, you just need to run that command once, from R, and then restart R.

Seems like it didn't like that either

dir.create(Sys.getenv("R_LIBS_USER"), recursive=TRUE)
Warning messages:
1: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="//home.ghc.org/home$/nguytp2": Access is denied
2: In dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE) :
'C:\Users\s804421\AppData\Local\R\win-library\4.3' already exists

What is the output of

Sys.getenv("R_LIBS_USER")
.libPaths()

This topic was automatically closed 42 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.