can't install ggplot2

i need someone to help me. i can't install package ggplot 2
i tried to reinstalling R Studio but it doesn't work.

can someone share some help?

Installing package into ‘C:/Users/Andre Yulianto/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rlang’, ‘scales’

  There are binary versions available but the source versions are later:
        binary source needs_compilation
scales   0.4.1  1.0.0              TRUE
ggplot2  2.2.1  3.1.0             FALSE

  Binaries will be installed
Package which is only available in source form, and may need compilation of
  C/C++/Fortran: ‘rlang’
  These will not be installed
trying URL ''
Content type 'application/zip' length 609664 bytes (595 KB)
downloaded 595 KB

package ‘scales’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Andre Yulianto\AppData\Local\Temp\RtmpwPqobg\downloaded_packages
installing the source package ‘ggplot2’

trying URL ''
Content type 'application/x-gzip' length 2863109 bytes (2.7 MB)
downloaded 2.7 MB

ERROR: dependency 'rlang' is not available for package 'ggplot2'
* removing 'C:/Users/Andre Yulianto/Documents/R/win-library/3.2/ggplot2'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-32~1.5/bin/x64/R" CMD INSTALL -l "C:\Users\Andre Yulianto\Documents\R\win-library\3.2" C:\Users\ANDREY~1\AppData\Local\Temp\RtmpwPqobg/downloaded_packages/ggplot2_3.1.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status

The downloaded source packages are in
	‘C:\Users\Andre Yulianto\AppData\Local\Temp\RtmpwPqobg\downloaded_packages’

Your error message is telling you that ggplot2 is not being installed because rlang is not being installed correctly.

You can first try simply running:


If this fails it may be because you do not have the necessary tools to build R packages from source. If this is the case, you will need to install RTools and then once that is done, re-run the installation of rlang again after restarting your R session.


thank you very much, you help me to solve this problem

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