R version 3.5及以上安装Bioconductor

2020-01-10  本文已影响0人  粥粥zz
image.png

R version 3.5及以上安装Bioconductor包的方法改变了
解决方法:

1.安装Bioconductor

options(repos=structure(c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")))
if (!requireNamespace("BiocManager", quietly = TRUE))
     install.packages("BiocManager")
sudo vi /etc/R/Rprofile.site
local({r <- getOption("repos")  
 r["CRAN"] <- "http://mirrors.tuna.tsinghua.edu.cn/CRAN/"   
options(repos=r)}) 
install.packages(‘gdata’, repos = ‘https://mirrors.tuna.tsinghua.edu.cn/CRAN’)

下面还有其他的镜像(https://cran.r-project.org/mirrors.html

https://mirrors.tuna.tsinghua.edu.cn/CRAN/ TUNA Team, Tsinghua University
http://mirrors.tuna.tsinghua.edu.cn/CRAN/ TUNA Team, Tsinghua University
https://mirrors.ustc.edu.cn/CRAN/ University of Science and Technology of China
http://mirrors.ustc.edu.cn/CRAN/ University of Science and Technology of China
https://mirror.lzu.edu.cn/CRAN/ Lanzhou University Open Source Society
http://mirror.lzu.edu.cn/CRAN/ Lanzhou University Open Source Society
http://mirrors.xmu.edu.cn/CRAN/ Xiamen University

2.检查是否安装Bioconductor成功

BiocManager::available()

3.BiocManager下载软件

options(BioC_mirror="https://mirrors.tuna.tsinghua.edu.cn/bioconductor")
library(BiocManager)
BiocManager::install('ballgown')

4.测试安装包是否加载成功

library(ballgown)

注:资料来源于:
https://blog.csdn.net/lotusng/article/details/101796763
https://www.omicsclass.com/article/106

上一篇下一篇

猜你喜欢

热点阅读