Search code examples
rtidyverserlang

Trouble downloading rlang with tidyverse


I recently installed the tidyverse. However, I get the following error message when calling it.

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

I do not know why rlang did not download. I tried to remedy this by downloading rlang separately. Before doing this, I went into my files and deleted the version of rlang that had already been there. Despite this, I got the following message:

> install.packages("rlang")
Installing package into ‘C:/Users/mbesw/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.2.0.zip'
Content type 'application/zip' length 817350 bytes (798 KB)
downloaded 798 KB

package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  cannot remove prior installation of package ‘rlang’

The downloaded binary packages are in
    C:\Users\mbesw\AppData\Local\Temp\RtmpWMK8gb\downloaded_packages

Despite having just installed it, I get the following message when I try to load rlang:

> library(rlang)
Error in library(rlang) : there is no package called ‘rlang’

Does anyone know why I am having issues with rlang in particular? Could there be an old version of rlang stored somewhere on my computer that I am not aware of?


Solution

  • It turned out there was an old version of rlang hidden on my computer. When I did a full computer search for "rlang" I found the files from a few months ago. After deleting all things that came up when I searched for "rlang", I reinstalled the tidyverse and was able to do what I needed to do.