I recently updated all of my packages and tried loading library(tidyverse) but received the following error:
Error: package or namespace load failed for 'tidyverse' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called 'tidyselect'
Execution halted
I've tried re-installing tidyverse, as well as ggplot2 and dplyr separately, restarted R as well as my computer, re-installed rlang and tidyselect, and all to no change in the error. ggplot2 seems to load fine but dplyr does not and I get a similar error. When I try and load tidyselect I receive this error:
Error: package or namespace load failed for ‘tidyselect’:
.onLoad failed in loadNamespace() for 'tidyselect', details:
call: is_string(x)
error: object 'rlang_is_string' not found
library(rlang) runs fine, but rlang_is_string does not appear as an option in the option drop down with either two or three semi colons (did not know about the three semi colons!).
Unfortunately received the same error, also tried loading library(devtools) on it's own and still met with:
Error: package or namespace load failed for ‘devtools’:
.onLoad failed in loadNamespace() for 'pkgload', details:
call: is_string(x)
error: object 'rlang_is_string' not found
This sort of errors is typical of silent installation failures on Windows. On this platform, DLLs can't be copied over if they are already in use. The manifestation of this is a warning (easily overlooked in the installation output) and a broken package.
Please close all your R and RStudio sessions before installing rlang. If you install it from github, use the {remotes} package which doesn't depend on rlang and thus won't load it in your session:
remotes::install_github("r-lib/rlang")
If that still doesn't work, check rlang isn't automatically loaded from your RProfile when you start a session.
The good news is I was able to correct everything by re-installing usethis and rlang but when this popped up:
Specifically hitting "No" instead of "Yes" (which I normally default to) corrected the issue and now everything works fine. The bad news is I don't know why this worked. I would love to understand why this happened if anyone has insight for future users?