cannot load R packages after using renv

package ‘stats’ in options("defaultPackages") was not found
error inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object‘C:/Program Files/R/R-4.4.1/library/stats/libs/x64/stats.dll’::
LoadLibrary failure: The network path was not found.
This error appeared even if I reinstall the R-4.4.1 and Rstudio, and I tried uninstalling Rtools, but it still didn't work. The path ‘C:/Program Files/R/R-4.4.1/library/stats/libs/x64' was also added into environmental variables.
The error message bumps up every time I start Rstudio and try loading R packages. The installation of R packages succeeded, but none of which can be loaded successfully. Also it may be due to the mistake using renv() so the path may go wrong.
Have you encountered such problems? Many thanks in advance.

I managed to solve this problem by accident, just copying all the files in .....\R-4.0.4\bin\x64 to .........\R-4.0.4\library\stats\libs\x64, and it worked.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.