I am having exactly the same sort of problem described in
I am running Windows 10 Home, version 10.0.18363 Build 18363.
I have removed all prior versions of R, RStudio, Rtools, and the package library then installed
R version 4.0.0 & RStudio Version 1.2.5042.
Launching RStudio generates the following messages in the console:
Error: package or namespace load failed for ‘stats’ in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'D:/Program Files/R/R-4.0.0/library/stats/libs/x64/stats.dll':
LoadLibrary failure: The specified module could not be found.
During startup - Warning message:
package ‘stats’ in options("defaultPackages") was not found
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'D:/Program Files/R/R-4.0.0/library/stats/libs/x64/stats.dll':
LoadLibrary failure: The specified module could not be found.
Launching R does not generate this message.
I tried the suggested
update.packages(checkBuilt=TRUE)
but there has been no change.
Like rjake, there was no library folder to overwrite.
In the post, kevinushey asks
"What is the output of:
Sys.getenv("PATH")
Sys.which("stats.dll")
This was marked as the solution but I am not yet fluent enough to see it.
What should the 'correct' values from Sys.getenv() & Sys.which() be?
How does one go about changing them if they are incorrect?
I get:
Sys.getenv("PATH")
[1] "D:\Program Files\R\R-4.0.0\bin"
Sys.which("stats.dll")
stats.dll
""
I have R.exe here: D:\Program Files\R\R-4.0.0\bin
Also:
.libPaths()
[1] "D:/Program Files/R/R-4.0.0/library"
I have stats.dll in 2 places on my system:
D:\Program Files\R\R-4.0.0\library\stats\libs\x64
D:\Program Files\R\R-4.0.0\library\stats\libs\i386
Thank you for any assistance you can offer.