r-如何从生物导管(而不是CRAN)安装包装

  • 本文关键字:CRAN 包装 安装 r bioconductor
  • 更新时间 :
  • 英文 :


在本教程中,它说

source("http://www.bioconductor.org/biocLite.R")
biocLite("limma")
library(limma)

返回各种错误。

这是在尝试从生物导管下载和安装吗?如果是,还有其他方法吗?

@dc37的答案是正确的,与您在BioConductor网页上找到的内容一致。

因为这既是一项相对常见的任务,也是一项可以在命令行上完成的任务,所以我最近在littler的GitHub repo中添加了一个助手脚本,现在我只需要执行

edd@rob:~$ installBioc.r limma
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.3 (2020-02-29)
Installing package(s) 'limma'
trying URL 'https://bioconductor.org/packages/3.10/bioc/src/contrib/limma_3.42.2.tar.gz'
Content type 'application/x-gzip' length 1494662 bytes (1.4 MB)
==================================================
downloaded 1.4 MB
* installing *source* package ‘limma’ ...
** using staged installation
** libs
ccache gcc -I"/usr/share/R/include" -DNDEBUG     -fpic  -g -O3 -Wall -pipe -pedantic  -std=gnu99 -c init.c -o init.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG     -fpic  -g -O3 -Wall -pipe -pedantic  -std=gnu99 -c normexp.c -o normexp.o
normexp.c: In function ‘fit_saddle_nelder_mead’:
normexp.c:165:78: warning: ISO C forbids passing argument 9 of ‘nmmin’ between function pointer and ‘void *’ [-Wpedantic]
165 |   nmmin(3, par, parsOut, Fmin, normexp_m2loglik_saddle, fail, abstol, intol, &ex, alpha, beta, gamma, trace, fncount, maxit);
|                                                                              ^~~
In file included from normexp.c:12:
/usr/share/R/include/R_ext/Applic.h:73:51: note: expected ‘void *’ but argument is of type ‘void (*)()’
73 |     int *fail, double abstol, double intol, void *ex,
|                                             ~~~~~~^~
ccache gcc -I"/usr/share/R/include" -DNDEBUG     -fpic  -g -O3 -Wall -pipe -pedantic  -std=gnu99 -c weighted_lowess.c -o weighted_lowess.o
ccache gcc -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o limma.so init.o normexp.o weighted_lowess.o -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/00LOCK-limma/00new/limma/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (limma)
The downloaded source packages are in
‘/tmp/downloaded_packages’
edd@rob:~$ 

本教程使用的是Bioconductor的早期版本,现在使用3.10版本,您必须使用BiocManager而不是BiocLite,并传递以下命令(如下所述:https://bioconductor.org/packages/release/bioc/html/limma.html):

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("limma")

有关BiocManagerBioconductor的更多信息,请点击此处:https://bioconductor.org/install/

最新更新