下载R及R stidio
R地址:R for Windows 4.1.3 Download for Windows / Old Versions / FileHorse.com
R stidio网址:Download the RStudio IDE - RStudio
下载BiocManager
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
更换镜像,加速下载
中科大镜像:
options(BioC_mirror="http://mirrors.ustc.edu.cn/bioc/")
清华镜像:
options(repos = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
安装R包:
BiocManager::install("edgeR")
BiocManager::install("GEOquery")
BiocManager::install("DESeq")
提示
提示版本不匹配
于是更新BioManager
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install()
提示
提示R版本太低
于是更新R
install.packages("installr")
library(installr)
updateR()
提示
由于用的国内的镜像,更新未果,更换镜像,再次更新R的版本
updateR(fast=TRUE,cran_mirror="https://mirrors.ustc.edu.cn/CRAN/")
更新成功!!一定要在tools—global options里选择新的版本,重启R后 再次开始装包
更新BioManaer
BiocManager::install(version = '3.15')
更新DESeq
BiocManager::install("DESeq")
下载DESeq2,注意DESeq2依赖stringi包,并且stringi包在国内镜像网速没办法下载,不更换国内镜像,一直用之前的镜像就可以.(此处存疑,我应该是没有单独下载过stringi,难道是R4.2.0自带了?)
BiocManager::install("DESeq2")
先下载pbapply再下载DREAMSeq
BiocManager::install("pbapply")
BiocManager::install("DREAMSeq")
下载GEOquery,Biobase
BiocManager::install("GEOquery")
BiocManager::install("Biobase")
下载affy
BiocManager::install("affy")
下载ggstatsplot,tidyr,ggplot2,devtools
install.packages("ggstatsplot")
install.packages("tidyr")
BiocManager::install("ggplot2")
install.packages('devtools')
安装patchwork
install.packages("patchwork")
安装rio
install_formats()
安装tidyverse
if(!require("tidyverse")) install.packages("tidyverse",update = F,ask = F)
所有的包使用前先声明,例library(GEOquery)