Issues installing tidyverse package and loading it

Please can someone help me with the below error messages encountered while trying to install the "tidyverse" package and loading it.

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/PC/AppData/Local/R/win-library/4.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.3/tidyverse_2.0.0.zip'
Content type 'application/zip' length 430680 bytes (420 KB)
downloaded 420 KB

Trying to load the package, I got the below error message.

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onAttach failed in attachNamespace() for 'tidyverse', details:
call: NULL
error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘colorspace’

I am new to learning R, please assist me resolve this issue so I could move on with my learning.

Was there no error message during the installation of tidyverse?

What happens if you run

install.packages("colorspace")

If that runs successfully. Try running library(tidyverse) again.

1 Like

I had a similar problem after I updated my R version. I can't quite remember how I fixed it - have you tried installing Rtools before tidyverse?

Dear FJCC,

I followed your direction and the library got loaded successfully without usual errors.

Many thanks.

This topic was automatically closed 21 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.