I wanted to use the packages ggplot2 and interactions. I first installed interactions and then ggplot2. However I got error messages because I did not have the newest version of ggplot2.
I tried updating ggplot2, which repeatedly did not work. So I deinstalled it and tried reinstalling it. Now I can't even install it again and "interactions" doesn't work either.
I don't understand what I did wrong, because I could install it the first time.
Ihis is the error message I get, when trying to install ggplot now:
> 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/ErikNB/Documents/R/win-library/4.0’ (as ‘lib’ is
> unspecified) also installing the dependencies ‘cli’, ‘lifecycle’,
> ‘rlang’, ‘vctrs’
>
>
> There are binary versions available but the source versions are
> later:
> binary source needs_compilation
>cli 3.2.0 3.6.1 TRUE
>lifecycle 1.0.1 1.0.3 FALSE
>rlang 1.0.2 1.1.1. TRUE
>vctrs 0.4.1 0.6.3 TRUE
>ggplot2 3.3.5 3.4.2. FALSE
>
> Binaries will be installed trying URL
> 'https://cran.rstudio.com/bin/windows/contrib/4.0/cli_3.2.0.zip'
> Content type 'application/zip' length 1255499 bytes (1.2 MB)
> downloaded 1.2 MB
>
> trying URL
> 'https://cran.rstudio.com/bin/windows/contrib/4.0/rlang_1.0.2.zip'
> Content type 'application/zip' length 1718546 bytes (1.6 MB)
> downloaded 1.6 MB
>
> trying URL
> 'https://cran.rstudio.com/bin/windows/contrib/4.0/vctrs_0.4.1.zip'
> Content type 'application/zip' length 1569486 bytes (1.5 MB)
> downloaded 1.5 MB
>
> package ‘cli’ successfully unpacked and MD5 sums checked package
> ‘rlang’ successfully unpacked and MD5 sums checked package ‘vctrs’
> successfully unpacked and MD5 sums checked
>
> The downloaded binary packages are in
> C:\Users\ErikNB\AppData\Local\Temp\Rtmpuga9xh\downloaded_packages
> installing the source packages ‘lifecycle’, ‘ggplot2’
>
> trying URL
> 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.3.tar.gz' Content
> type 'application/x-gzip' length 106854 bytes (104 KB) downloaded 104
> KB
>
> trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.4.2.tar.gz'
> Content type 'application/x-gzip' length 3153811 bytes (3.0 MB)
> downloaded 3.0 MB
>
> * installing *source* package 'lifecycle' ...
> ** Paket 'lifecycle' erfolgreich entpackt und MD5 Summen überprüft
> ** using staged installation
> ** R
> ** inst
> ** byte-compile and prepare package for lazy loading Fehler in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
> namespace 'rlang' 1.0.2 is being loaded, but >= 1.0.6 is required Ruft
> auf: <Anonymous> ... withCallingHandlers -> loadNamespace ->
> namespaceImport -> loadNamespace Ausführung angehalten ERROR: lazy
> loading failed for package 'lifecycle'
> * removing 'C:/Users/ErikNB/Documents/R/win-library/4.0/lifecycle'
> * restoring previous 'C:/Users/ErikNB/Documents/R/win-library/4.0/lifecycle' Warning in
> install.packages : installation of package ‘lifecycle’ had non-zero
> exit status
> * installing *source* package 'ggplot2' ...
> ** Paket 'ggplot2' erfolgreich entpackt und MD5 Summen überprüft
> ** using staged installation
> ** R
> ** data
> *** moving datasets to lazyload DB
> ** inst
> ** byte-compile and prepare package for lazy loading Fehler in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
> namespace 'rlang' 1.0.2 is being loaded, but >= 1.1.0 is required Ruft
> auf: <Anonymous> ... withCallingHandlers -> loadNamespace ->
> namespaceImport -> loadNamespace Ausführung angehalten ERROR: lazy
> loading failed for package 'ggplot2'
> * removing 'C:/Users/ErikNB/Documents/R/win-library/4.0/ggplot2' Warning in install.packages : installation of package ‘ggplot2’ had
> non-zero exit status
this is the output i get from sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] compiler_4.0.5 tools_4.0.5
LEK, it seems from here:
removing 'C:/Users/ErikNB/Documents/R/win-library/4.0/ggplot2'
that you are not using the latest version of R itself, which is actually 4.3.1 ---> https://www.r-project.org/
I would start from scratch by installing the latest version of R, if 4.0 is not a must, and then trying again to install interactions
and ggplot2
packages.