【问题标题】:Can not install the CRAN package `caret` on IBM Watson Studio R notebooks无法在 IBM Watson Studio R 笔记本上安装 CRAN 包“caret”
【发布时间】:2018-07-15 02:32:41
【问题描述】:

尝试在 IBM Watson Studio 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”

【问题讨论】:

    标签: r data-science-experience rnotebook watson-studio


    【解决方案1】:

    caret 导入了很多其他的R 包。其中之一是recipes,它依次导入purrrlubridatetibble 等包。最新的recipes 包似乎依赖于来自purrr 的名为map_dfr 的映射函数未加载到命名空间的包。更新purrr(可能还有其他软件包的列表)可能会解决问题。我选择在recipes 上降低一个版本并节省大量重新安装。这对我有用:

    install.packages('https://cran.r-project.org/src/contrib/Archive/recipes/recipes_0.1.0.tar.gz')
    install.packages('caret')
    library('caret')
    

    【讨论】:

    • 是的,由于 DSX 上的 RStudio 版本不是当前版本,如果遇到非零问题,通常需要在库上下载一个版本才能获取它们。
    • 很高兴知道。这个问题专门针对 DSX 上的 Jupyter R Notebooks。
    猜你喜欢
    • 2018-08-10
    • 2019-12-28
    • 1970-01-01
    • 2019-09-24
    • 2020-03-04
    • 2019-05-04
    • 2019-02-25
    • 1970-01-01
    • 2020-09-02
    相关资源
    最近更新 更多