我正在尝试安装 library(caret)
,但在 juypter 笔记本中不断收到此错误。
我也试过 install.packages("ggplot2)
和 library(ggplot2)
但没有任何效果。
也是 install.packages('caret', dependencies = TRUE)
但同样的错误
library(e1071)
library(caret)
library(kknn)
library(AUC)
library(MASS)
"package 'ggplot2' was built under R version 3.6.3"Error: package or namespace load failed for 'ggplot2' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace 'rlang' 0.3.4 is already loaded, but >= 0.4.10 is required
Error: package 'ggplot2' could not be loaded
Traceback:
1. library(caret)
2. .getRequiredPackages2(pkgInfo, quietly = quietly)
3. stop(gettextf("package %s could not be loaded", sQuote(pkg)),
. call. = FALSE, domain = NA)
答案 0 :(得分:0)
操作。我以前在加载/安装包时见过这种类型的错误。密切注意错误的文本 - 特别是,这部分应该跳出来:
namespace 'rlang' 0.3.4 is already loaded, but >= 0.4.10 is required
从该行看来,您的 rlang
版本似乎需要先更新。请尝试以下操作:
install.packages('rlang')
# wait for install
install.packages('ggplot2')