You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何获取已从CRAN移除的assertive R包?

解决assertive包无法从CRAN安装的问题

由于assertive已从CRAN仓库移除,你可以通过以下几种方式获取该包:

1. 安装CRAN归档版本

CRAN会保留已移除包的历史版本归档,直接通过源码安装即可:

install.packages("https://cran.r-project.org/src/contrib/Archive/assertive/assertive_0.3-6.tar.gz", repos = NULL, type = "source")

注:如果你的系统需要编译源码,Windows需提前安装Rtools,macOS需安装Xcode命令行工具。

2. 从GitHub仓库安装

该包的开发者在GitHub托管了代码,可借助devtools包安装:

  1. 先安装devtools(未安装的话):
install.packages("devtools")
  1. 安装GitHub上的assertive版本:
devtools::install_github("richierocks/assertive")

3. 替换依赖包

如果assertive只是某个包的依赖项,你可以检查依赖它的包是否有更新版本(已替换assertive依赖);或者联系该包的开发者,询问替代方案。

内容的提问来源于stack exchange,提问作者melboyd

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.03 07:54:54