GGplot instalation

install.packages("ggplot2")
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/
also installing the dependencies ‘cli’, ‘gtable’, ‘lifecycle’, ‘rlang’, ‘scales’, ‘vctrs’

There are binary versions available but the source versions are later:
binary source needs_compilation
cli 2.5.0 3.6.1 TRUE
gtable 0.3.0 0.3.3 FALSE
lifecycle 1.0.0 1.0.3 FALSE
rlang 0.4.11 1.1.0 TRUE
scales 1.1.1 1.2.1 FALSE
vctrs 0.3.8 0.6.1 TRUE
ggplot2 3.3.3 3.4.2 FALSE

Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/cli_2.5.0.zip'
Content type 'application/zip' length 534931 bytes (522 KB)
downloaded 522 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rlang_0.4.11.zip'
Content type 'application/zip' length 1224139 bytes (1.2 MB)
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/vctrs_0.3.8.zip'
Content type 'application/zip' length 1289331 bytes (1.2 MB)
downloaded 1.2 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\hp\AppData\Local\Temp\RtmpuEGAnY\downloaded_packages
installing the source packages ‘gtable’, ‘lifecycle’, ‘scales’, ‘ggplot2’

trying URL 'https://cran.rstudio.com/src/contrib/gtable_0.3.3.tar.gz'
Content type 'application/x-gzip' length 130057 bytes (127 KB)
downloaded 127 KB

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/scales_1.2.1.tar.gz'
Content type 'application/x-gzip' length 270609 bytes (264 KB)
downloaded 264 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' ...
    ** package 'lifecycle' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    namespace 'rlang' 0.4.11 is being loaded, but >= 1.0.6 is required
    Calls: ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
    Execution halted
    ERROR: lazy loading failed for package 'lifecycle'
  • removing 'D:/Downloads/R-3.6.0/library/lifecycle'
    Warning in install.packages :
    installation of package ‘lifecycle’ had non-zero exit status
    ERROR: dependency 'lifecycle' is not available for package 'gtable'
  • removing 'D:/Downloads/R-3.6.0/library/gtable'
    Warning in install.packages :
    installation of package ‘gtable’ had non-zero exit status
    ERROR: dependency 'lifecycle' is not available for package 'scales'
  • removing 'D:/Downloads/R-3.6.0/library/scales'
    Warning in install.packages :
    installation of package ‘scales’ had non-zero exit status
    ERROR: dependencies 'gtable', 'lifecycle', 'scales' are not available for package 'ggplot2'
  • removing 'D:/Downloads/R-3.6.0/library/ggplot2'
    Warning in install.packages :
    installation of package ‘ggplot2’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\hp\AppData\Local\Temp\RtmpuEGAnY\downloaded_packages’

rlang' 0.4.11 is being loaded, but >= 1.0.6 is required

It looks like you need to update {rlang}0

Restart R and RStudio and do

 install.packages("rlang") 

and then try {ggplot2} again.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.