相比起Mac和Linux系统,在Windows上下载和使用R有自己独特的(麻烦之处)
1. 下载R和Rstudio
R的下载网站:https://cran.r-project.org/mirrors.html
(在该网站下选择中国的镜像网站,然后下载)
Rstudio的下载网站:https://rstudio.com
2. 下载Rtools
Rtools的下载网站:https://cran.r-project.org/bin/windows/Rtools/
3. 设置CRAN的镜像
options(download.file.method = 'libcurl')
options(url.method='libcurl')
options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")
options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
4. 安装BiocManager
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")