I have used Rstudio for a long time but I have run into quite an annoying issue. Recently, I have been unable to load or install packages in Rstudio. Here is a rundown of the details:
The problem started randomly in the version of Rstudio that I had at the time. Since then, I have completely uninstalled and installed the newest version of R and Rstudio. However, every time I try to install a new package, it says that it installed correctly, but when I try to call it, this comes up:
Error: package or namespace load failed for ‘apaTables’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/lee51/AppData/Local/R/win-library/4.2/generics/R/generics.rdb': No such file or directory
Here is an example of the output for the "ggplot2" package:
Installing package into ‘C:/Users/lee51/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/ggplot2_3.3.6.zip'
Content type 'application/zip' length 4122980 bytes (3.9 MB)
downloaded 3.9 MB
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
And the output when I try to call it using library:
Error: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):
** cannot open file 'C:/Users/lee51/AppData/Local/R/win-library/4.2/colorspace/R/colorspace.rdb': No such file or directory**
In the past, I've never had to specify or alter anything related to the library and the pathing of Rstudio, so I am not sure why this error is occuring.
Any and all help is greatly appreciated!