I realize that there are many similar topics such as mine, but none of the appear to resolve my issues. From one day to the next I am now unable to install any packages. I always get the following error:
> install.packages("gapminder")
Installing package into ‘C:/Users/mario/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
'lib = "C:/Users/mario/Documents/R/win-library/4.0"' is not writable
If I then chose the option to 'use a personal library instead' I get:
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/gapminder_0.3.0.zip'
Content type 'application/zip' length 2031853 bytes (1.9 MB)
downloaded 1.9 MB
Warning in install.packages :
cannot create dir 'C:\Users\mario\Documents\R\win-library\4.0\filecb869a32b3e', reason 'No such file or directory'
Error in install.packages : unable to create temporary directory ‘C:\Users\mario\Documents\R\win-library\4.0\filecb869a32b3e’
Googling on SO and other places suggests that this is a permission issue. However, I double checked and I am running RStudio under admin permission and I have double-checked that both RStudio and R 4.0 have full read/write privilege for admins:
and for regular users:
The library folder exists and is full of all the libraries that I always use:
And I believe this is independent of RStudio since going straight to R and trying to install from there leads to the same problems:
I am running Windows 10 Home 10.0.19041