vijay MV
vijay MV

Reputation: 75

Why am I getting an error while trying to load caret package?

I tried:

library(caret)

then I got the error:

Loading required package: ggplot2

Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 0.3.0.1 is already loaded, but >= 0.3.1 is required Error: package ‘ggplot2’ could not be loaded In addition: Warning message: package ‘ggplot2’ was built under R version 3.5.3

so I tried updating the ggplot2 using:

install.package("ggplot")

even after that I am getting the same error. my caret package is also updated.

Upvotes: 0

Views: 1588

Answers (1)

user11409849
user11409849

Reputation:

I think you can try two things. One is updating your R version (and Rstudio version?). The other can be updating ggplot2 with dependencies:

install.packages('ggplot2', dependencies = TRUE)

Upvotes: 1

Related Questions