I am trying to install and load packages, but I cannot figure out why it isn't working for me. Here is what I did and the warning and error messages I got:
> install.packages("tidyverse")
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/emily/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidyverse_1.3.0.zip'
Content type 'application/zip' length 440101 bytes (429 KB)
downloaded 429 KB
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\emily\AppData\Local\Temp\RtmpySGca2\downloaded_packages
> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
object ‘is_present’ is not exported by 'namespace:lifecycle'
In addition: Warning message:
package ‘tidyverse’ was built under R version 3.6.3
I get these messages when I try to install any package and I've never run into this error before. Any help is appreciated.
I've had problems with the R version 4 when associated with shiny context as well.
My solution was getting back to version 3.6.3 and things are working properly again
Thank you for the suggestion, but I get the same messages when I tried to install that package.
> install.packages("lifecycle")
Error in install.packages : Updating loaded packages
> install.packages("lifecycle")
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/emily/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/lifecycle_0.2.0.zip'
Content type 'application/zip' length 101659 bytes (99 KB)
downloaded 99 KB
package ‘lifecycle’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\emily\AppData\Local\Temp\RtmpMDaZVv\downloaded_packages
> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘dplyr’ 0.8.3 is being loaded, but >= 1.0.0 is required
In addition: Warning message:
package ‘tidyverse’ was built under R version 3.6.3
this is a different message than previously.
The problem with lifecycle has been solved.
unfortunately you have to repeat the pattern of installing defective dependencies.
Reading the message tells me you should:
Thank you. I installed and loaded the dplyr package and then tried loading the tidyverse and got this:
> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘tibble’ 2.1.3 is already loaded, but >= 3.0.0 is required
In addition: Warning message:
package ‘tidyverse’ was built under R version 3.6.3
Do I just keep installing the packages it says in the error messages until the problem is solved?