Problem with ggplot2 installation

I am having issues installing ggplot2 package . I am trying to install the file for this package that I have Downloaded from CRAN

following is the error that i am getting :

install.packages("C:/Users/so.62/Downloads/ggplot2_3.3.5.tar.gz", repos = NULL, type = "source")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
Installing package into ‘C:/Users/so.62/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
ERROR: dependencies 'digest', 'glue', 'gtable', 'isoband', 'rlang', 'scales', 'tibble', 'withr' are not available for package 'ggplot2'

  • removing 'C:/Users/so.62/Documents/R/win-library/4.1/ggplot2'
    Warning in install.packages :
    installation of package ‘C:/Users/sodhi.62/Downloads/ggplot2_3.3.5.tar.gz’ had non-zero exit status

Please can you suggest how to fix this issue

Install RTools, that's important
then try again,
if it didn't work
try to install some of those dependencies (rlang for example) and then try again with ggplot2

This topic was automatically closed 21 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.