can't install ggplot2

ggplot2

#1

hello,
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?
thanks,

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 'https://cran.rstudio.com/bin/windows/contrib/3.2/scales_0.4.1.zip'
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 'https://cran.rstudio.com/src/contrib/ggplot2_3.1.0.tar.gz'
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’

#2

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:

install.packages("rlang")

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.


#3

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


closed #4

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.