无法在 windows 8.1 上的 R 中安装 ggplot2 包

Unable to install ggplot2 package in R on windows 8.1

我尝试使用以下命令安装 ggplot2,但无法安装。

> library('ggplot2')
Error in library("ggplot2") : there is no package called ‘ggplot2’\
> install.packages('ggplot2', dependencies = T)

   package ‘ggplot2’ is available as a source package but not as a binary

Warning in install.packages :
  package ‘ggplot2’ is not available (as a binary package for R version 3.1.3)
> 

有人能告诉我出了什么问题吗?

当我使用命令 install.packages("ggplot2", type="source",dependencies = TRUE) 时出现以下错误

*** arch - i386
Warning: running command 'make -f "D:/R/R-31~1.3/etc/i386/Makeconf" -f "D:/R/R-31~1.3/share/make/winshlib.mk" SHLIB="acepack.dll" SHLIB_LIBADD='$(FLIBS)' OBJECTS="ace.o avas.o rlsmo.o"' had status 127
ERROR: compilation failed for package 'acepack'
* removing 'D:/R/R-3.1.3/library/acepack'
Warning in install.packages :
  running command '"D:/R/R-31~1.3/bin/x64/R" CMD INSTALL -l "D:\R\R-3.1.3\library" C:\Users\surjya\AppData\Local\Temp\RtmpWyq9oh/downloaded_packages/acepack_1.3-3.3.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘acepack’ had non-zero exit status

有时镜像需要很长时间才能更新,他们几天都不会提取包的二进制文件。

尝试install.packages("ggplot2", type="source")

...根据记忆,它通常适用于 Windows。