3
上鍵入不能經由命令行手動
install.packages("ggplot2")
我得到以下結果安裝plyr包或:
Installing package into ‘/home/suraj/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning: dependency ‘plyr’ is not available
also installing the dependencies ‘reshape2’, ‘scales’
ERROR: dependency ‘plyr’ is not available for package ‘reshape2’
* removing ‘/home/suraj/R/x86_64-pc-linux-gnu-library/3.0/reshape2’
ERROR: dependency ‘plyr’ is not available for package ‘scales’
* removing ‘/home/suraj/R/x86_64-pc-linux-gnu-library/3.0/scales’
ERROR: dependencies ‘plyr’, ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/home/suraj/R/x86_64-pc-linux-gnu-library/3.0/ggplot2’
The downloaded source packages are in
‘/tmp/RtmpSWlplq/downloaded_packages’
Warning messages:
1: In install.packages("ggplot2") :
installation of package ‘reshape2’ had non-zero exit status
2: In install.packages("ggplot2") :
installation of package ‘scales’ had non-zero exit status
3: In install.packages("ggplot2") :
installation of package ‘ggplot2’ had non-zero exit status
當我試圖通過首先下載plyr包安裝「plyr」包和在使用
install.packages("plyr_1.8.2.tar.gz",repos=NULL,type="source")
我得到以下信息:
Installing package into ‘/home/suraj/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
ERROR: this R is version 3.0.2, package 'plyr' requires R >= 3.1.0
Warning message:
In install.packages("plyr_1.8.2.tar.gz", repos = NULL, type = "source") :
installation of package ‘plyr_1.8.2.tar.gz’ had non-zero exit status
install.packages("plyr_1.8.2.tar.gz",repos=NULL)
Installing package into ‘/home/suraj/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
ERROR: this R is version 3.0.2, package 'plyr' requires R >= 3.1.0
Warning message:
In install.packages("plyr_1.8.2.tar.gz", repos = NULL) :
installation of package ‘plyr_1.8.2.tar.gz’ had non-zero exit status
plase誰能指導我這件事情!
您的R版本是3.0.2,而安裝最新版本的'plyr'則需要更高版本。無論是升級R還是嘗試從這裏安裝舊版本的'plyr':http://cran.r-project.org/src/contrib/Archive/plyr/ – nicola
順便說一句,'dplyr'已經取代'plyr'對於大多數用途,自2014年以來。 – smci
@smci雖然我認爲'dplyr'是一個很棒的軟件包,我不認爲它可以幫助您安裝'ggplot2'(OP正試圖實現什麼)...... – nicola