I uninstalled and installed RStudio and R I'm trying to run the following code:
install.packages("ggplot2") library(ggplot2)
install works, but when I type in "library(ggplot2)", that doesn't work. Error below.
Error: package or namespace load failed for ‘ggplot2’ in inDL(x, as.logical(local), as.logical(now), ...): unable to load shared object 'C:/Program Files/R/R-4.1.1/library/stats/libs/x64/stats.dll': LoadLibrary failure: The specified module could not be found.
It looks like this is a path error. I ran the following lines of code: Sys.getenv()[ grep("LIB|PATH", names(Sys.getenv())) ] Sys.getenv()
And these are the defaults that I have R_LIBS_USER C:/Users/tasny/OneDrive/Documents/R/win-library/4.1 R_USER C:/Users/tasny/OneDrive/Documents PATH /C:/rtools40;
and here's my working directory and libpaths
getwd() [1] "C:/Users/tasny/OneDrive/Documents" .libPaths() [1] "C:/Users/tasny/OneDrive/Documents/R/win-library/4.1" "C:/Program Files/R/R-4.1.1/library"
I'm not sure what to do here? I don't even know how to change the lib paths if that's the issue