我想使用R包BOLTSSIRR在我的R包中的GitHub上可用,我想把它上传到CRAN。
我将BOLTSSIRR列在Suggests:文件中的DESCRIPTION文件中,并使用Additional_repositories: https://github.com/daviddaigithub/BOLTSSIRR提供到GitHub的链接。
然而,在运行R CMD check --as-cran时,我得到:
Suggests or Enhances not in mainstream repositories:
BOLTSSIRR
Availability using Additional_repositories specification:
BOLTSSIRR no ?
? ? https://github.com/daviddaigithub/BOLTSSIRR
Additional repositories with no packages:
https://github.com/daviddaigithub/BOLTSSIRR因此,GitHub链接在检查中似乎没有被识别。我可以在这里换点东西吗?
发布于 2021-03-29 10:00:51
正如您所发现的,您不能在CRAN包中使用Remotes。您需要做的是确保您所依赖的包的.tar.gz文件在某个地方可用。Github不会自动完成这个任务,因为https://github.com/daviddaigithub/BOLTSSIRR不是作为包存储库设置的。
解决方案是创建自己的小型存储库,并在其中保留非CRAN包的副本。drat包(可在这里获得:https://github.com/eddelbuettel/drat)使这很容易,只要您有一个Github帐户:按照这里的说明:https://github.com/drat-base/drat。总结如下:
将computer.
drat包中的docs/文件夹将其克隆到您自己的remotes::install_github("eddelbuettel/drat")页面中。(我假设这个版本最终会变成CRAN;如果您使用当前CRAN版本,说明要插入的包complicated.)options(dratBranch="docs"); drat::insertPackage(...)将这些文件插入到您的Additional_repositories: https://yourname.github.io/drat
到DESCRIPTION.
如果更新了,将负责更新存储库。这是好的,因为更新可能破坏您的:毕竟,它仍然处于开发模式。这也是不好的,因为您的用户不会自动获得错误修复。
就这样,如果我什么都没错过!
https://stackoverflow.com/questions/66849936
复制相似问题