如何使用 R 版本 3.5.1 加载 Caret 库?

How can I load the Caret library with R version 3.5.1?

我需要在 Caret 中使用 createDataPartition 函数,但我无法在 3.5.1 版本中正确加载 Caret 库。我能做什么?

library(caret) Loading required package: lattice Loading required package: ggplot2 Error: package or namespace load failed for ‘caret’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘Biobase’

install.packages("Biobase") Installing package into ‘C:/Users/Xavier Roca/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘Biobase’ is not available (for R version 3.5.1)

你可以试试这个:

install.packages("BiocManager")
BiocManager::install("Biobase")

然后尝试加载或安装 caret