Reputation: 1000
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?
Upvotes: 1
Views: 8066
Reputation: 199
Instructions that solved my problem
Run these commands:
install.packages("stringi", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
Then:
install.packages("stringr", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
Then:
install.packages("tidyverse")
After you run these commands tidyverse should be installed with all the dependencies. If there are any dependencies that didn't install with tidyverse you can use the same method shown in the beginning to install them.
Eg:
install.packages("packageName", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
Upvotes: 5
Reputation: 1000
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.
Upvotes: 4