简体   繁体   English

R在加载包时要求未知的依赖关系

[英]R asking for unknown dependency when loading package

I'm the maintainer for the package 'rase' (link) . 我是包“ rase” (链接)的维护者。

I haven't changed the code at all since Nov 9, 2015, when the package could load without problems. 自2015年11月9日起,程序包可以毫无问题地加载后,我再也没有更改代码。 However, I have received emails asking about the following problem when loading the package: 但是,我在加载程序包时收到有关以下问题的电子邮件:

> library(rase)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘Biostrings’
Error: package or namespace load failed for ‘rase’

I tried then to do it in my own computer, and I received the same message. 然后,我尝试在自己的计算机上执行此操作,并且收到了相同的消息。 Between the last time I loaded the package successfully (Nov 2015) and now, I upgraded R to v 3.2.3. 从我上次成功加载软件包的时间(2015年11月)到现在,我将R升级到了3.2.3。 Naively, I reinstalled v3.2.2, but the same error appears. 天真的,我重新安装了v3.2.2,但出现了相同的错误。 I have checked rase code (git here) thoroughly, but no changes have been made and there is no reference whatsoever to 'Biostrings' (or any function within). 我已经彻底检查了rase代码(此处git) ,但未进行任何更改,也没有对“ Biostrings”(或其中的任何函数)的任何引用。 'rase' dependencies and imports do not include 'Biostrings'. “ Rase”依赖性和导入不包括“ Biostrings”。

Any help would be much appreciated as I don't know why this is happening (I'm a novice when creating packages). 我不知道为什么会发生任何帮助(我是创建软件包的新手),将不胜感激。 I guess I could install 'Biostrings', but I don't want to make a seemingly unnecessary dependency. 我想我可以安装“ Biostrings”,但是我不想做一个看似不必要的依赖。

Here is my sessionInfo: 这是我的sessionInfo:

> sessionInfo()
R version 3.2.2 (2015-08-14)    
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.2 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ape_3.4          data.table_1.9.6

loaded via a namespace (and not attached):
 [1] quadprog_1.5-5          lattice_0.20-33         mvtnorm_1.0-3           msm_1.6                
 [5] MASS_7.3-43             chron_2.3-47            grid_3.2.2              nnls_1.4               
 [9] nlme_3.1-121            magrittr_1.5            Matrix_1.2-2            splines_3.2.2          
[13] tools_3.2.2             igraph_1.0.1            maps_3.0.2              parallel_3.2.2         
[17] numDeriv_2014.2-1       survival_2.38-3         mnormt_1.5-3            clusterGeneration_1.3.4
[21] animation_2.4           expm_0.999-0         

Biostrings is a BioConductor package which you install following the instructions on this page : Biostrings是一个BioConductor软件包,您可以按照此页面上的说明进行安装:

## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")
biocLite("Biostrings")

If you add BioC as a known repository on your system, it will be installable via install.packages() too. 如果将BioC添加为系统上的已知存储库,则也可以通过install.packages()进行安装。 Eg this would do 例如,这样做

r <- getOption("repos")
r["CRAN"] <- "http://cran.rstudio.com"
r["BioCsoft"] <- "http://www.bioconductor.org/packages/release/bioc"
options(repos = r)

in your .Rprofile or Rprofile.site . 在您的.RprofileRprofile.site

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM