1、报错“Warning: unable to access index for repository https://mirrors.bfsu.edu.cn/CRAN/src/contrib: cannot open URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/PACKAGES'”
解决方法:
> options(repos='http://cran.rstudio.com/') #把https换成http
> BiocManager::install("devtools")
仍然报错!
BiocManager包的下载和安装
BiocManager包的下载:
#先选择镜像,这里是清华镜像,然后安装
options("repos"=c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
install.packages("BiocManager")
查看BiocManager包的版本信息、更新:
#查看版本
BiocManager::version()
#版本不符合当前R包,可以根据提示更新到与R相应的版本,例如,
BiocManager::install(version="3.7")
#查看是否有需要更新的包
BiocManager::valid()
#,然后根据提示更新需要更新的包
BiocManager::install("需要更新的包的名字", update = TRUE, ask = FALSE)