R packages

了解如何创建包的网站: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/

  1. 下载包

Installing packages from CRAN through R/RStudio

1、代码

install.packages("ggplot2")
install.packages(c("ggplot2","devtools","lme4""))
  1. 框框(不知道怎么描述)

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")

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值