This is my first time positing in the R Studio Community. I am fairly new to R. Ultimately, I am just trying to load the tidyverse package. It was worked in the past (using "library(tidyverse)" but when I tried today, I receive the following error message.
Any suggestions would be appreciated!
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘dplyr’ 1.0.2 is already loaded, but >= 1.0.3 is required
In addition: Warning message:
package ‘tidyverse’ was built under R version 4.0.4
If you get the exact same error message then you haven't installed the packages successfully, please post the complete output message you get when you run this command.
install.packages("dplyr")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/chris/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
also installing the dependency ‘vctrs’
When I try installing "Rtools" I get the following error as well. Could this be solved by just downloading the latest version of R?
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/chris/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘Rtools’ is not available (for R version 4.0.2)
You have a permission issue, the package is not been installed, double check your write permission on that folder.
About this, Rtools is not an R package, it is a separate software that you need to install in your system, you can download it from here. https://cran.r-project.org/bin/windows/Rtools/
Hard to help you with system specific issues, an alternative would be to run RStudio as administrator and install into the system level package library instead. You can change the default library folder by setting your R_LIBS_SITE environmental variable on a .Reviron or .Rprofile file
# In a .Renviron file you can set it by adding this line
R_LIBS_SITE="C:\\Program Files\\R\\R-4.0.3\\library"
For a more detailed explanation, you can read this blog post