我正在使用 R 编程语言。我正在尝试安装“使用 R 进行数据挖掘”( DMwR
)包。然而,当我访问CRAN website for this package ,好像没了:
Package ‘DMwR’ was removed from the CRAN repository.
Formerly available versions can be obtained from the archive.
Archived on 2021-03-16 as check problems were not corrected despite reminders.
A summary of the most recent check results can be obtained from the check results archive.
我访问了Github page for this package
然后,我尝试直接从 Github 安装这个包:
> library(devtools)
Loading required package: usethis
Warning message:
package ‘usethis’ was built under R version 4.0.5
> install_github("Luis Torgo/DMwR")
Error: Failed to install 'unknown package' from GitHub:
JSON: EXPECTED value GOT <
但这也行不通。有人可以告诉我如何安装这个包吗?
最佳答案
除了从 CRAN 镜像仓库安装之外,另一种选择是
remotes::install_version("DMwR", version="0.4.1")
remotes::install_github("cran/<package>")
一样,您将从源代码安装,这意味着如果包或其任何依赖项已经编译了组件(在这种情况下它没有出现),您将需要在您的计算机上安装开发工具(编译器等)系统一个简短的警告:
关于r - 安装从 CRAN 中删除的包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67978168/