I am trying to install the library(caret)
but keep getting this error in juypter notebook. I also tried install.packages("ggplot2)
and then library(ggplot2)
but nothing works. Also install.packages('caret', dependencies = TRUE)
but the same error
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)
OP. I've seen this type of error before when loading/installing a package. Pay close attention to the text of the error - in particular, this part should jump out at you:
namespace 'rlang' 0.3.4 is already loaded, but >= 0.4.10 is required
From that line, it seems that your version of rlang
will need to be updated first. Try the following:
install.packages('rlang')
# wait for install
install.packages('ggplot2')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.