1.首先安裝BiocManager包
如果你的R版本為3.6版本,請將版本號設(shè)置為version = "3.11"
version = "3.12"適用于R 4.0.0
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.12")
library("BiocManager")
2.通過BiocManager安裝我們常用的R包
BiocManager::install("ggplot2")
BiocManager::install(c("ggplot2","ggtree","DESeq2"))
#一次安裝多個包
source("https://bioconductor.org/biocLite.R")
BiocInstaller::biocLite(c("GenomicFeatures", "AnnotationDbi"))
#安裝特定的包