安装ggp​​lot2时出错 [英] Error installing ggplot2

查看:487
本文介绍了安装ggp​​lot2时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在 ggplot2 上运行简单代码,并得到以下错误:

 源(u1.txt)
库中的错误(ggplot2):没有名为'ggplot2'的包


错误:包'foreign'是在R 3.0之前构建的.0:请重新安装
错误:包'maptools'延迟加载失败
*去除'/home/shivangi/R/i686-pc-linux-gnu-library/3.0/maptools'
*安装*源*包'multcomp'...
**包'multcomp'成功解压并检查MD5总和
** R
**数据
***将数据集移动到lazyload DB
** demo
** inst
**为延迟加载准备程序包
**帮助
***安装帮助索引
**构建软件包索引
**安装配置文件
**测试是否可以加载已安装的软件包
* DONE(multcomp)
错误:依赖关系'plyr', 'reshape2','scales'不适用于包'ggplot2'
*移除'/home/shivangi/R/i686-pc-linux-gnu-library/3.0/ggplot2'

下载的源码包在
'/ tmp / RtmpOGWrr4 / downloaded_pa​​ckages'
警告消息:
1:在install.packages(ggplot2,dep = TRUE)中:
安装包'Rcpp'具有非零退出状态
2:In install.packages(ggplot2,dep = TRUE):
安装包'plyr'具有非零退出状态
3:在install.packages(ggplot2,dep = TRUE)中:
安装包'testthat'具有非零退出状态
4:在install.packages(ggplot2,dep = TRUE)中:
安装包'reshape2'具有非零退出状态
5:在install.packages(ggplot2,dep = TRUE)中:
安装包'scales'具有非零退出状态
6:在install.packages(ggplot2 ,dep = TRUE):
安装包'Hmisc'具有非零退出状态
7:在install.packages(ggplot2,dep = TRUE)中:
安装o f包'maptools'具有非零退出状态
8:在install.packages(ggplot2,dep = TRUE)中:
包'ggplot2'的安装具有非零退出状态


解决方案

我今天晚上运行ggplot时有同样的错误,尝试安装失败的所有依赖项。对我来说,它是尺度,然后是munsell,然后是最终(实际问题)的色彩空间,自从我升级到3.1.1以来这些色彩空间并未更新。在你的情况下,它看起来像你想先尝试安装外国,然后再次尝试ggplot2。继续手动加载依赖关系,直到找到真正的问题。


I was trying to run a simple code on ggplot2 and got the following error:

source("u1.txt")
Error in library(ggplot2) : there is no package called ‘ggplot2’


Error : package ‘foreign’ was built before R 3.0.0: please re-install it
ERROR: lazy loading failed for package ‘maptools’
* removing ‘/home/shivangi/R/i686-pc-linux-gnu-library/3.0/maptools’
* installing *source* package ‘multcomp’ ...
** package ‘multcomp’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (multcomp)
ERROR: dependencies ‘plyr’, ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/home/shivangi/R/i686-pc-linux-gnu-library/3.0/ggplot2’

The downloaded source packages are in
    ‘/tmp/RtmpOGWrr4/downloaded_packages’
Warning messages:
1: In install.packages("ggplot2", dep = TRUE) :
  installation of package ‘Rcpp’ had non-zero exit status
2: In install.packages("ggplot2", dep = TRUE) :
  installation of package ‘plyr’ had non-zero exit status
3: In install.packages("ggplot2", dep = TRUE) :
  installation of package ‘testthat’ had non-zero exit status
4: In install.packages("ggplot2", dep = TRUE) :
  installation of package ‘reshape2’ had non-zero exit status
5: In install.packages("ggplot2", dep = TRUE) :
  installation of package ‘scales’ had non-zero exit status
6: In install.packages("ggplot2", dep = TRUE) :
  installation of package ‘Hmisc’ had non-zero exit status
7: In install.packages("ggplot2", dep = TRUE) :
  installation of package ‘maptools’ had non-zero exit status
8: In install.packages("ggplot2", dep = TRUE) :
  installation of package ‘ggplot2’ had non-zero exit status

解决方案

I had the same error running ggplot this evening, essentially you need to try to install all the dependencies that failed. For me it was "scales", then "munsell" and then finally (the actual problem) "colorspace" which hadn't be updated since I upgraded to 3.1.1. In your case, it looks like you want to first try installing "foreign" and then try ggplot2 again. Keep loading dependencies that error manually until you find the real problem.

这篇关于安装ggp​​lot2时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆