This keeps happening in R every time I try to load packages

Viewed 42

So, I keep getting this error: library(tidyverse)

Warning: package ‘tidyverse’ was built under R version 4.1.3 Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘stringi’

This is not speciic to tidyverse. I got the exact same error with installR. What is stringi? I uninstall and re-installed the stringi package and it continues. I tried devtools, and it continues.

I tried updating R using installR and the error continues. I tried downloading it from cran and it continues.

Any advice?! This is super annoying.

1 Answers

The error message suggests that you need to install the stringi package first. Hence, you need to run the following:

install.packages( c('stringi', 'tidyverse') )

Alternatively, you can try to install the package with its dependencies using the following:

install.packages('tidyverse', dependencies = c("Depends", "Imports", "LinkingTo") # "this installs all the packages needed to run pkgs, their examples, tests and vignettes (if the package author specified them correctly)." per the description for the help file for install.packages()
Related