错误:ggplot2和data.table的程序包或命名空间加载失败 [英] Error: package or namespace load failed for ggplot2 and for data.table
本文介绍了错误:ggplot2和data.table的程序包或命名空间加载失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法打开安装ggplot2和data.table包。
它给我以下错误(ggplot2的示例)
I am not able to open install the ggplot2 and data.table packages. It gives me the following error (example for ggplot2)
> library(ggplot2)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘Rcpp’
Error: package or namespace load failed for ‘ggplot2’
在我关闭我的R会话之前,我能够与这两个包合作。
I was able to work fine with these 2 packages before I closed my R session. Now it shows me this error each time I try to run it.
我也试图删除并重新安装它,但没有成功。
I have also tried to remove and re-install it, but without success.
remove.packages(c("ggplot2", "data.table"))
install.packages('ggplot2', dep = TRUE)
install.packages('data.table', dep = TRUE)
I不确定有什么问题
推荐答案
非常感谢你!)
这解决了问题:
remove.packages(c("ggplot2", "data.table"))
install.packages('Rcpp', dependencies = TRUE)
install.packages('ggplot2', dependencies = TRUE)
install.packages('data.table', dependencies = TRUE)
这篇关于错误:ggplot2和data.table的程序包或命名空间加载失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文