4
votes

I'm getting the following error when I'm loading tidyverse. It was all working fine a few minutes ago when I was running my shinyapp. How should I resolve this?

Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 0.3.0.1 is already loaded, but >= 0.3.1 is required

5
hi, try to uninstall and reinstall the rlang package. Also check your libray paths. You can do so by typing .libPaths(). - Cettt
Sure, thanks much. That worked. - Shreya Agarwal
Make sure that another R process/session that has the package loaded isn't running at the same time you're trying to reinstall the same package. - sbha

5 Answers

6
votes

I had the same problem but managed to tackle it. You may remove the current version of rlang using the following command:

remove.packages("rlang")

and then install the rlang again:

install.packages("rlang")

After that run the library:

library(tidyverse)
2
votes

I know this is an old question but I faced this same problem. I restarted R session and it worked fine after that. Hope this helps someone! :)

0
votes

Also had similar problem but resolved it after a struggle. I used:-

devtools::install_github("tidyverse/tidyverse")
0
votes

I know this might be late answer,but I had the same issue and I fixed it by updating the packages, specifically : ggplot2, scales. according to this Rstudio site

0
votes

I have just encountered the similar problem.

The error could translate into understandable English as:

package 'rlang' version 0.3.0.1 is loaded into R succefully, but the other package that based on 'ralng' required a higher version (at least 0.3.1).

So that manually install.packages('rlang') will update the latest appropriate package 'rlang'