Hi,
I uninstalled R and Rstudio from my laptop (windows 10 - operated), then after installing the new version 4.1.2, every time I install any package, I got this error message:
Error in install.packages : cannot open file 'C:/Users/xxxxxx/Documents/R/win-library/4.1/file1808276551dc/magrittr/help/figures/exposition-1.png': Permission denied
I do not know how to reset the path of the library folder. May you please help me to figure it out? Also, every time I open Rstudio, I found the environment loaded with data from the latest ran code, however, I cleaned the environment but the data are still loaded. The weird thing is that these data were loaded using the older version, how they have been recalled in the new version?
Something to add, I just checked the path to library:
.libPaths()
and I got 2 paths:
[1]"C:/Users/xxxxxx/Documents/R/win-library/4.1"
[2] "C:/Program Files/R/R-4.1.2/library"
The first path has folders for the old and new versions, and the second path for the newly installed version. So, how can I delete the first path?
Thanks!
I edited Rprofile.site file by adding a function with the targeted path, but I can not save the file in C partition got this message " You do not have permission to open this file. See the owner of the file or an adminstrator to obtain permission".
I tried to edit the access properties from the security tab to "Everyone" but it did not work.
Any recommendations!
Thanks in advance
Okay, I changed the permission criteria and now I could save Rprofile.site file. However, when I ran .libPath(), I still have both paths, I do not know why?
What I added to Rprofile file is an extra function as follows:
.First <- function(){
.libPaths("C:/Program Files/R/R-4.1.2/library")
}