尝试在Data Science Experience R笔记本上安装R软件包caret
时,它会安装大量依赖项,但最终会因非零退出状态错误而失败。由于某种原因,无法安装依赖项recipes
。
install.packages('caret')
Installing package into ‘/.../R/libs’
(as ‘lib’ is unspecified)
also installing the dependencies ‘numDeriv’, ‘SQUAREM’, ‘lava’, ‘kernlab’, ‘CVST’, ‘DEoptimR’, ‘prodlim’, ‘DRR’, ‘robustbase’, ‘sfsmisc’, ‘ipred’, ‘dimRed’, ‘lubridate’, ‘ddalpha’, ‘gower’, ‘RcppRoll’, ‘tidyselect’, ‘recipes’, ‘withr’
Warning message in install.packages("caret"):
“installation of package ‘recipes’ had non-zero exit status”Warning message in install.packages("caret"):
“installation of package ‘caret’ had non-zero exit status”
答案 0 :(得分:2)
包caret
导入了很多其他R包。其中一个是recipes
,它反过来导入包purrr
,lubridate
,tibble
等。最新的recipes
包似乎依赖于映射来自map_dfr
包的名为purrr
的函数,该函数未加载到命名空间。更新purrr
(可能还有其他软件包列表)可能会解决问题。我选择在recipes
上下载一个版本,并节省了大量的重新安装。这对我有用:
install.packages('https://cran.r-project.org/src/contrib/Archive/recipes/recipes_0.1.0.tar.gz')
install.packages('caret')
library('caret')