tidyverse package is not working

Hi

When i'm loading the library tidyverse, i'm getting below error

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

Due to this, group_by() is not working.

I did all below but in vain:

  1. Updated all packages.
  2. Also reinstalled R and R-studio

Also, Rstudio is crashing when i terminate a R session. Even post re-installation of Rstudio.

Regards
Ilyas

What information do you get from

sessionInfo()

?

Thanks, please try:

install.packages("rlang")

I tried to reinstall and got the permission denied error for "rlang.dll" under directory "R\win-library\3.6\rlang\libs\x64".
I manually deleted and installed rlang, which went through.

But when i now try to load the libraries, im getting below error for most of them
'.../R/win-library/3.6/rlang/R/rlang.rdb' is corrupt

should i try uninstall and reinstall of R and Rstudio?

Be sure to be in a clean and fresh session and that rlang is not loaded in some way by the .Rprofile at the beginning of the session. On windows, dll are locked and that could be an issue.

I think you should

  • Be sure no R is open in your computer (no RStudio no R process)
  • open R in clean state. (with RStudio or not)
  • install rlang from CRAN
  • see if it works.
  • Restart R
  • install the other :package:

The dll think means it was locked in some way and this corrupted you library.

You could check also in R\win-library\3.6 that you don't have a LOCK folder for rlang, and even remove the rlang folder to uninstall before installing again.

hope it helps

2 Likes

Thanks cderv.

I couldnt terminate R session as the Rstudio was crashing. I did reupdated all packages and wasnt using the PC and shifted my work to the laptop.
Surprisingly, when i worked on today to resolve this issue, its working.

Thanks for all your support.

1 Like

Glad it worked !

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

Hi cderv, yes, i indeed chosen nirgrahamuks' solution as it helped me to find out the root cause.
Appreciate your help.

1 Like

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