Error: Failing to install Tidyverse package - r

Below is the exact error code. I am new to R, RStudio, and tidyverse. I did load Tidyverse two years ago for a class on the same computer but have not used it since. Below is the exact error code.
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘purrr’ 0.3.4 is already loaded, but >= 1.0.1 is required
I have turned both the R program and R studio off and on again, and turned my computer off and on again. The same error occurs. I may uninstall and reinstall R to see if that helps.

As it turns out, the purrr package was out of date, which it actually says in the last line of code. I just needed time to stop and think.

Related

Error: package or namespace load failed for ‘tmap’

I am getting the error below when I am trying to run my shiny app which used to work properly; I did not get this error using the old version of my R/Rstudio. Currently, I am using Version 1.1.463 of Rstudio, and R version 4.0.3.
Thanks,
Nader
Error: package or namespace load failed for ‘tmap’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘raster’
The problem was with installing the ratser. When the question below prompted during the installation, I answered no instead of yes, and this solved the issue. Thanks.
Do you want to install from sources the package which needs compilation? (Yes/no/cancel)

Tidy Verse Issue

I am using tidyverse for the first time and I am very new to R and Rstudio.
I installed the tidyverse package in Rstudio and continued with my code.
My code until now is just this:
library (tidyverse)
damsel <- read.csv("mecistogaster_in_bromeliads_multiyear.csv")
damsel %>% filter (genus == "Weruhaia")
When I piped, it gave me the error saying that object 'genus' is not found.
When I looked into my packages tidyverse was not ticked-- So I tried to again reload it by typing library (tidyverse).
It showed me the following error 'Error: package or namespace load failed for ‘dplyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘pillar’'
I have tried to restart R three times since this issue and all the three times I get the same error.
How do I get this to work?
Did you run
Install.packages(“tidyverse”)
cderv wrote on community.studio.com:
install.packages("tidyverse", dependencies = TRUE) to install everything tidyverse depends on.
Once installed.
library(tidyverse)
This may be the blind leading the blind, but... Have you successfully installed any packages? If not, there could be an issue of where your packages are installing.

Which version of R is compatible with the newest version of Blavaan (August 3rd, 2019)?

I would like to use blavaan (version 0.3-5) for my analysis. Installing the package blavaan seems to work (i.e., no error messages), but when I try to load the library 'blavaan', I receive the following error message:
Error: package or namespace load failed for ‘blavaan’ in
loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =
vI[[j]]): there is no package called ‘pkgbuild’
This is the error message I receive in the newest version of R (3.6.1). I checked, and it appears af if the package pkgbuild may not compatible with this version. Therefore, I tried an older version of R (3.5.3) in which blavaan was created. So then it should work, right?
But then again I receive a similar error message. This time for a package called vctrs.
For some background: I have experience with lavaan ('regular' SEM), and wanted to give blavaan a try. I know my way around lavaan and basic R, but I am not a programmer/mathematician or something like that. I think the best solution for me is to just use a version of R that others know will work, rather than having to program my way around.
This is the code I used, but I don't think that is the issue:
install.packages("blavaan", dep = TRUE)
library(blavaan)
After installing 'blavaan', I get the following message:
package ‘blavaan’ successfully unpacked and MD5 sums checked The
downloaded binary packages are in [location]
However, after opening the library 'blavaan', I receive the following error:
Error: package or namespace load failed for ‘blavaan’ in
loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =
vI[[j]]): there is no package called ‘pkgbuild’ [or 'vctrs' etc.]
I have only just started using blavaan (or: trying to...), so I only have tried the newest version of blavaan (0.3-5) that was updated on August 3rd, 2019.
Has anybody since then used blavaan? And if so, which version of R did you use?

R tells me I'm missing a dependency package when I'm not?

I have a handful of R scripts that I routinely run every day so all of the necessary packages have been running just fine for months. Yesterday I installed the RInno package and I believe this has somehow affected other packages because my routine scripts no longer run due to the inability to load my normal packages.
When troubleshooting I started with the odbc package. When trying to load it gives me:
Error: package or namespace load failed for ‘odbc’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘Rcpp’
I then ran .libPaths(), checked both of the returned paths, and the Rcpp package existed in both.
I've even tried re-installing both odbc and Rcpp with no luck. Does anyone know what could be going on here?
Update1: While trying to re-install Rcpp did not work, re-installing dplyr did manage to fix the missing rlang issue. So I decided to go download Rcpp directly from https://cran.r-project.org/web/packages/Rcpp/index.html and then paste it manually into both of my library folders. This seems to have fixed the Rcpp issue but I am now met with the following new error when trying to load odbc or run devtools::session_info():
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : object 'vI' not found
Update2: Ultimately I decided to do a restore on my two library folders to a time before I installed RInno and it seems to have worked. I still have no idea what RInno did but I won't be trying that again.

Trouble Installing and Calling R Package

I am trying to install the R package "rattle".
I do so by simply typing:
install.packages("rattle")
...upon which a lot of good installin' seems to take place. But then when I call the package
library(rattle)
I get the error message
Error: package or namespace load failed for ‘rattle’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘stringi’
All of the research I've done online suggests some form of
install.packages("rattle", insert_something_here)
but I've had no luck with such methods.
Any ideas on what I'm missing?
Ok, so the entire issue seemed to revolve around the stringi package.
I first installed the latest Rtools package from
https://cran.r-project.org/bin/windows/Rtools/
and then I was able to successfully install stringi manually
install.packages("stringi")
and then I could call rattle no problem.

Resources