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:
and I got 2 paths:
 "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?