错误:打包“ggplot2”在装入插入符号包时无法找到 [英] Error: Package "ggplot2" could not be found, when loading the caret package

查看:475
本文介绍了错误:打包“ggplot2”在装入插入符号包时无法找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我安装插入符号。

  install.packages(caret,依赖关系= c(取决于,建议))
库(caret)
##加载所需包:lattice
##加载所需包:ggplot2




LoadNamespace中的错误(i,c(lib.loc,.libPaths()),versionCheck = vI [[i]]):
没有名为'digest '
错误:package'ggplot2'无法加载。


所以我解决了这个问题包摘要通过使用此代码安装脱字符号和我再次得到什么:

  install.packages(caret,dep = TRUE)
库(插入符)
##加载所需包:lattice
##加载所需包:ggplot2




LoadNamespace(i,c(lib.loc,.libPaths()),versionCheck = vI [[i]])中的错误:
没有名为'gtable'的软件包
错误:无法加载软件包'ggplot2'。




如何在没有这种错误的情况下成功安装脱字符号,特别是ggplot2错误!



我的R版本是R 3.2.2

解决方案

感谢各位的帮助。我确实尝试了安装包 digest install.packages(caret,dep =TRUE),然后尝试使用 gtable 来安装 ggplot ,其中安装了 install.packages(ggplot) code>但仍有一些缺失的软件包。根据提示安装缺失的软件包后,最终设法加载了 caret ,没有任何问题。


When I install caret with.

install.packages("caret", dependencies=c("Depends", "Suggests"))
library(caret)
## Loading required package: lattice
## Loading required package: ggplot2

Error in LoadNamespace(i, c(lib.loc, .libPaths()), versionCheck=vI[[i]]): there is no package called 'digest'
Error: package 'ggplot2' could not be loaded.

So I resolve the issue with the package digest by installing caret using this code and what do I get again:

install.packages("caret",  dep="TRUE")
library(caret)
## Loading required package: lattice
## Loading required package: ggplot2

Error in LoadNamespace(i, c(lib.loc, .libPaths()), versionCheck=vI[[i]]): there is no package called 'gtable'
Error: package 'ggplot2' could not be loaded.

How do I install caret successfully without this kind of errors, especially the ggplot2 error!

my R Version is R 3.2.2

解决方案

Thanks guys for the help. I did try install.packages("caret", dep="TRUE") which installed the package digest, then tried install.packages("ggplot") which installed ggplot with the dependency gtable but still had some missing packages. Did finally manage to load caret without any problems after installing the missing packages as prompted.

这篇关于错误:打包“ggplot2”在装入插入符号包时无法找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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