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.
I followed the steps linked at bottom ot this paragraph for the Windows 10 issue regarding saving files to one drive. I also used the code “setwd(C:/R Folder”) and tested it with “getwd()” which returned “[1] "C:/R Folder"”.
I have a .Renviron file in the Working Directory with the following text:
PATH="{RTOOLS40_HOME}\usr\bin;{PATH}"
#DEFAULTS (from install; found using Sys.getenv() )
R_DOC_DIR C:/PROGRA~1/R/R-41~1.1/doc
R_HOME C:/PROGRA~1/R/R-41~1.1
R_LIBS_USER C:/Users/tasny/OneDrive/Documents/R/win-library/4.1
R_USER C:/Users/tasny/OneDrive/Documents
PATH C:\rtools40/C:/rtools40;
HOME C:/Users/tasny/OneDrive/Documents
The R files are (default) installed to the path:
C:/Users/tasny/OneDrive/Documents/R/win-library/4.1
C:/Program Files/R/R-4.1.1
RStudio files located here:
C:/Program Files/RStudio
RTools files located here:
C:/rtools40