0

I recently updated R and Rstudio and since then have not been able to load any libraries, including ggplot2, tidyverse.

Just for clarity, let me share the messages I get when I install tidyverse and try to load the library:

install.packages("tidyverse") WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

**https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/Computer User 1/AppData/Local/R/win-library/4.2’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/tidyverse_1.3.2.zip' Content type 'application/zip' length 428970 bytes (418 KB) downloaded 418 KB

package ‘tidyverse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\Computer User 1\AppData\Local\Temp\RtmpQZdI11\downloaded_packages**

**> library(tidyverse) Error: package or namespace load failed for ‘tidyverse’ in inDL(x, as.logical(local), as.logical(now), ...): unable to load shared object 'C:/Program Files/R/R-4.2.2/library/stats/libs/x64/stats.dll': LoadLibrary failure: The specified module could not be found. **

Also, to be clear, I did install the latest version of Rtools.

Now I tried reading through several messages on google regarding the same error but failed to understand the solution. The main thing I do not understand is why the packages are installed here: C:\Users\Computer User 1\AppData\Local\Temp\RtmpQZdI11\downloaded_packages, and then are loaded from here: C:/Program Files/R/R-4.2.2/library/stats/libs/x64/stats.dll.

I have tried specifying the library path but have not been successful at solving the problem. I don't know why R is unable to load the libraries. Also, on running .libpaths(), I get two libraries: [1] "C:/Users/Computer User 1/AppData/Local/R/win-library/4.2" [2] "C:/Program Files/R/R-4.2.2/library" And when I try to install tidyverse here: C:/Program Files/R/R-4.2.2/library, I get this error: the folder is unwritable.

I don't know how to solve this issue. Please help.

0 Answers0