作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试安装 R 包 caret
这给了我错误:依赖项“ggplot2”,“reshape2”,“BradleyTerry2”不适用于包“caret”
我尝试单独安装其中的每一个,这再次显示安装正在进行,并以消息结束,安装包“X”的退出状态为非零
1: In install.packages("caret") :
installation of package ‘minqa’ had non-zero exit status
2: In install.packages("caret") :
installation of package ‘RcppEigen’ had non-zero exit status
3: In install.packages("caret") :
installation of package ‘scales’ had non-zero exit status
4: In install.packages("caret") :
installation of package ‘reshape2’ had non-zero exit status
5: In install.packages("caret") :
installation of package ‘lme4’ had non-zero exit status
6: In install.packages("caret") :
installation of package ‘ggplot2’ had non-zero exit status
7: In install.packages("caret") :
installation of package ‘BradleyTerry2’ had non-zero exit status
8: In install.packages("caret") :
installation of package ‘caret’ had non-zero exit status
递归地要求安装一些软件包。这是什么问题?
我有旧版本,我遇到了类似的错误。我删除并安装了最新的。当前版本是R版本3.1.2(2014-10-31)--“Pumpkin Helmet”
,但仍然收到类似的错误消息
更新
开始于: install.packages('caret', repos='http://cran.rstudio.com/')
显示消息:
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘minqa’, ‘RcppEigen’, ‘scales’, ‘lme4’, ‘ggplot2’, ‘reshape2’, ‘BradleyTerry2’
进程结束于:
installing to /usr/local/lib/R/site-library/reshape2/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error : package ‘stringr’ was built before R 3.0.0: please re-install it
ERROR: lazy loading failed for package ‘reshape2’
* removing ‘/usr/local/lib/R/site-library/reshape2’
ERROR: dependencies ‘minqa’, ‘RcppEigen’ are not available for package ‘lme4’
* removing ‘/usr/local/lib/R/site-library/lme4’
ERROR: dependencies ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/usr/local/lib/R/site-library/ggplot2’
ERROR: dependency ‘lme4’ is not available for package ‘BradleyTerry2’
* removing ‘/usr/local/lib/R/site-library/BradleyTerry2’
ERROR: dependencies ‘ggplot2’, ‘reshape2’, ‘BradleyTerry2’ are not available for package ‘caret’
* removing ‘/usr/local/lib/R/site-library/caret’
The downloaded source packages are in
‘/tmp/RtmpcLo8Rw/downloaded_packages’
Warning messages:
1: In install.packages("caret", repos = "http://cran.rstudio.com/") :
installation of package ‘minqa’ had non-zero exit status
2: In install.packages("caret", repos = "http://cran.rstudio.com/") :
installation of package ‘RcppEigen’ had non-zero exit status
3: In install.packages("caret", repos = "http://cran.rstudio.com/") :
installation of package ‘scales’ had non-zero exit status
4: In install.packages("caret", repos = "http://cran.rstudio.com/") :
installation of package ‘reshape2’ had non-zero exit status
5: In install.packages("caret", repos = "http://cran.rstudio.com/") :
installation of package ‘lme4’ had non-zero exit status
6: In install.packages("caret", repos = "http://cran.rstudio.com/") :
installation of package ‘ggplot2’ had non-zero exit status
7: In install.packages("caret", repos = "http://cran.rstudio.com/") :
installation of package ‘BradleyTerry2’ had non-zero exit status
8: In install.packages("caret", repos = "http://cran.rstudio.com/") :
installation of package ‘caret’ had non-zero exit status
最佳答案
作为caret Documentation suggests执行 install.packages("caret", dependency = c("Depends", "Suggests"))
以确保安装所有需要的包并解决所有依赖项
关于r - 在 R 中安装插入符包时出现依赖问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27478328/
我是一名优秀的程序员,十分优秀!