了解如何创建包的网站:http://r-pkgs.had.co.nz/
1、What are repositories(仓库)?
A repository is a central location where many developed packages are located and available for download.
There are three big repositories:
1. CRAN (Comprehensive R Archive Network): R’s main repository (>12,100 packages available!)
2. BioConductor: A repository mainly for bioinformatic-focused packages
3. GitHub: A very popular, open source repository (not R specific!)
2、怎样找到所需要的包
(1)CRAN 将所有包分成35个主题,可以根据自己感兴趣的进行查看
https://cran.r-project.org/web/views/

(2)R包的一个搜索引擎,可以找到来自 CRAN, BioConductor, and GitHub的包
https://www.rdocumentation.org/

下载包
Installing packages from CRAN through R/RStudio
1、代码
install.packages("ggplot2")
install.packages(c("ggplot2","devtools","lme4""))
框框(不知道怎么描述)

Installing from Bioconductor(https://www.bioconductor.org/install/)
首先下载BiocManager,若已经下载就可以跳过这步
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.16")
下载bioconductor中的包
BiocManager::install(c("GenomicFeatures", "AnnotationDbi"))
Installing from GitHub(https://kbroman.org/pkg_primer/pages/github.html)
首先下载devtools package.
install.packages("devtools")
然后加载
library(devtools)
最后载入github上的包
install_github("author/package")
例子https://github.com/kbroman/broman
install_github("kbroman/broman")