gpt4 book ai didi

r - ggplot2 在 R 3.0.2 上安装失败

转载 作者:行者123 更新时间:2023-12-02 07:34:33 25 4
gpt4 key购买 nike

我无法在 Ubuntu 上的 R 3.0.2 中安装 ggplot2。

当我运行时

install.packages('ggplot2',dependencies = TRUE)

我收到以下错误。

 > install.packages('ggplot2',dependencies = TRUE)
Installing package into ‘/home/gowthamn/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependencies ‘plyr’, ‘testthat’ are not available
also installing the dependencies ‘reshape2’, ‘scales’, ‘Hmisc’

trying URL 'http://cran.rstudio.com/src/contrib/reshape2_1.4.1.tar.gz'
Content type 'application/x-gzip' length 34693 bytes (33 Kb)
opened URL
==================================================
downloaded 33 Kb

trying URL 'http://cran.rstudio.com/src/contrib/scales_0.2.4.tar.gz'
Content type 'application/x-gzip' length 40093 bytes (39 Kb)
opened URL
==================================================
downloaded 39 Kb

trying URL 'http://cran.rstudio.com/src/contrib/Hmisc_3.16-0.tar.gz'
Content type 'application/x-gzip' length 629536 bytes (614 Kb)
opened URL
==================================================
downloaded 614 Kb

trying URL 'http://cran.rstudio.com/src/contrib/ggplot2_1.0.1.tar.gz'
Content type 'application/x-gzip' length 2351203 bytes (2.2 Mb)
opened URL
==================================================
downloaded 2.2 Mb

ERROR: dependency ‘plyr’ is not available for package ‘reshape2’
* removing ‘/home/gowthamn/R/x86_64-pc-linux-gnu-library/3.0/reshape2’
Warning in install.packages :
installation of package ‘reshape2’ had non-zero exit status
ERROR: dependency ‘plyr’ is not available for package ‘scales’
* removing ‘/home/gowthamn/R/x86_64-pc-linux-gnu-library/3.0/scales’
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependencies ‘plyr’, ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/home/gowthamn/R/x86_64-pc-linux-gnu-library/3.0/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependencies ‘ggplot2’, ‘scales’ are not available for package ‘Hmisc’
* removing ‘/home/gowthamn/R/x86_64-pc-linux-gnu-library/3.0/Hmisc’
Warning in install.packages :
installation of package ‘Hmisc’ had non-zero exit status

我也尝试过

install.packages(c('reshape2','scales'))

收到 plyr 不可用的错误。

我还升级了 Ubuntu,并重新安装了最新版本的 R,并使用 update.packages(checkBuilt=TRUE) 更新了软件包。但是,没有任何效果。我能做什么?

最佳答案

如果不需要最新版本,可以安装Ubuntu发布的打包版本:

sudo apt-get install r-cran-ggplot2

关于r - ggplot2 在 R 3.0.2 上安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30636670/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com