从CRAN安装R包不包括Bioconductor包。

huangapple go评论98阅读模式
英文:

Installing R-package from CRAN does not include Bioconductor packages

问题

我有一个在CRAN上的R包。当我使用install.packages("mypackage")安装它时,我会收到警告消息Warning in install.packages : dependencies ‘x’,‘y’ are not available,其中x和y是Bioconductor上的包。这导致我的包中的函数使用x和y中的函数无法正常工作。

这个问题似乎突然出现(可能是当我更新了自己的R版本时?),只影响Bioconductor Imports,不影响CRAN Imports。包x和y是完全可用的,如果我单独使用BiocManager::install(c("x", "y"))安装它们,我的包可以正常工作。我的包在CRAN中通过了所有检查。如此处建议,我在我的包DESCRIPTION中有biocViews:。经过一些研究,我最好的猜测是,也许问题是由于R和Bioconductor版本之间的不匹配引起的,正如这里所描述的,尽管我必须说,我不完全理解这一点。

对于为什么我遇到这个问题以及如何解决它,有什么想法吗?目前,我最好的解决方案是在自述文件中添加说明,说明可能需要单独下载Bioconductor包,但这并不是最佳解决方案。

英文:

I have an R-package on CRAN. When I install it, using install.packages("mypackage"), I get the warning message Warning in install.packages : dependencies ‘x’, ‘y’ are not available, with x and y being packages on Bioconductor. This leads to functions in my package using functions from x and y not working.

This problem seem to have appeared out of nowhere (maybe when I updated my own R-version?), and only affects Bioconductor Imports, not CRAN Imports. Packages x and y are perfectly functional, and if I install them separately using BiocManager::install(c("x", "y")) my package works as it should. My package passes all checks in CRAN. As suggested here I have biocViews: in my package DESCRIPTION. After some research, my best guess is that maybe the problem is due to mismatches between R and Bioconductor releases, as described here, although I have to say, I don't fully understand this.

Any ideas on why I have this problem, and how to fix it? Currently, my best solution is to add instructions to the readme that the Bioconductor packages may need to be downloaded separately, but that is not an optimal solution.

答案1

得分: 3

尝试使用 BiocManager 安装 CRAN 包,因为它可以安装 CRAN 和 Bioconductor 包:

BiocManager::install("mypackage")
英文:

Try using BiocManager to install the CRAN package, as it can install both CRAN and bioconductor packages:

BiocManager::install("mypackage")

huangapple
  • 本文由 发表于 2023年8月10日 16:53:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76874117.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定