---
title: "拓展资源"
subtitle: "持续学习与进阶参考"
---
## 官方文档
::: {.resource-grid}
::: {.resource-card}
#### [R官方文档](https://www.r-project.org/)
- R语言官方网站
- 下载与安装指南
- 新闻与更新
:::
::: {.resource-card}
#### [Posit (原RStudio)](https://posit.co/)
- RStudio IDE下载
- 商业版功能介绍
- 云端服务
:::
::: {.resource-card}
#### [Quarto](https://quarto.org/)
- 下一代科学出版系统
- 官方文档与教程
- 丰富的示例库
:::
::: {.resource-card}
#### [R Markdown](https://rmarkdown.rstudio.com/)
- R Markdown官方指南
- 示例库
- 扩展包介绍
:::
:::
---
## 经典教材
### R语言基础
| 书名 | 作者 | 说明 |
|------|------|------|
| **R数据科学** | Hadley Wickham | tidyverse权威指南,必读,[在线免费阅读](https://r4ds.hadley.nz/) |
| **R语言实战** | Robert Kabacoff | 全面系统,适合入门 |
| **Advanced R** | Hadley Wickham | 进阶必读书,[在线免费阅读](https://adv-r.hadley.nz/) |
| **Efficient R Programming** | Colin Gillespie | 高效编程技巧 |
### R Markdown与报告
| 书名 | 作者 | 说明 |
|------|------|------|
| **R Markdown Cookbook** | Yihui Xie 等 | 实用技巧大全,[在线免费阅读](https://bookdown.org/yihui/rmarkdown-cookbook/) |
| **R Markdown: The Definitive Guide** | Yihui Xie 等 | [在线免费阅读](https://bookdown.org/yihui/rmarkdown/) |
| **bookdown** | Yihui Xie | 撰写书籍和文档,[在线免费阅读](https://bookdown.org/yihui/bookdown/) |
| **Quarto指南** | Posit团队 | 现代报告工具,[官方文档](https://quarto.org/docs/guide/) |
### 生物信息学
| 书名 | 作者 | 说明 |
|------|------|------|
| **Bioconductor案例分析** | 多位作者 | 生信实战 |
| **Bioinformatics with R** | Robert Gentleman | Bioconductor基础 |
| **Modern Statistics for Modern Biology** | Holmes & Huber | 现代统计方法,[在线免费阅读](https://www.huber.embl.de/msmb/) |
---
## 在线课程
::: {.columns}
::: {.column width="50%"}
### 中文资源
- [统计之都](https://cosx.org/) - 中国统计学社区
- [知乎 - R语言话题](https://www.zhihu.com/topic/19559338)
- [B站 - R语言教程](https://www.bilibili.com/) - 搜索"R语言"
- [DataCamp](https://www.datacamp.com/) - 付费但质量高
:::
::: {.column width="50%"}
### 英文资源
- [DataCamp](https://www.datacamp.com/) - 交互式学习
- [Coursera - R Programming](https://www.coursera.org/learn/r-programming) - Johns Hopkins
- [edX - Data Science with R](https://www.edx.org/) - 多所名校课程
- [swirl](https://swirlstats.com/) - R内置交互教程
:::
:::
---
## 关键R包
### 数据科学
| 包名 | 用途 | 学习资源 |
|------|------|----------|
| `tidyverse` | 数据科学全家桶 | [R4DS](https://r4ds.hadley.nz/) |
| `dplyr` | 数据处理 | [dplyr教程](https://dplyr.tidyverse.org/) |
| `ggplot2` | 数据可视化 | [ggplot2书](https://ggplot2-book.org/) |
| `tidyr` | 数据整理 | [tidyr教程](https://tidyr.tidyverse.org/) |
| `readr` | 数据读取 | [readr教程](https://readr.tidyverse.org/) |
| `stringr` | 字符串处理 | [stringr教程](https://stringr.tidyverse.org/) |
| `lubridate` | 日期时间 | [lubridate教程](https://lubridate.tidyverse.org/) |
### 生物信息学
| 包名 | 用途 | 来源 |
|------|------|------|
| `Biostrings` | 序列分析 | Bioconductor |
| `GenomicRanges` | 基因组区间 | Bioconductor |
| `DESeq2` | RNA-seq差异分析 | Bioconductor |
| `edgeR` | RNA-seq分析 | Bioconductor |
| `limma` | 微阵列/RNA-seq | Bioconductor |
| `ComplexHeatmap` | 热图绘制 | Bioconductor |
| `clusterProfiler` | 富集分析 | Bioconductor |
### 报告与文档
| 包名 | 用途 |
|------|------|
| `rmarkdown` | 动态报告 |
| `knitr` | 代码编织 |
| `bookdown` | 撰写书籍 |
| `flexdashboard` | 数据看板 |
| `DT` | 交互式表格 |
| `plotly` | 交互式图表 |
| `htmlwidgets` | HTML交互组件 |
---
## 工具与软件
### R环境
- **[R](https://www.r-project.org/)** - R语言核心
- **[RStudio](https://posit.co/download/rstudio-desktop/)** - 最佳R IDE
- **[Positron](https://github.com/posit-dev/positron)** - 新一代数据科学IDE
### 版本控制
- **[Git](https://git-scm.com/)** - 版本控制
- **[GitHub](https://github.com/)** - 代码托管
- **[GitHub Desktop](https://desktop.github.com/)** - 图形化Git工具
### LaTeX
- **[TinyTeX](https://yihui.org/tinytex/)** - 轻量级LaTeX发行版(推荐)
- **[TeX Live](https://tug.org/texlive/)** - 完整LaTeX发行版
- **[MiKTeX](https://miktex.org/)** - Windows平台
---
## 社区与论坛
::: {.columns}
::: {.column width="50%"}
### 中文社区
- [统计之都](https://cosx.org/) - 中国统计学社区
- [知乎 - R语言话题](https://www.zhihu.com/topic/19559338)
- [Bioconductor中文社区](https://www.bioconductor.org/)
:::
::: {.column width="50%"}
### 英文社区
- [Stack Overflow [r]](https://stackoverflow.com/questions/tagged/r)
- [Posit Community](https://community.rstudio.com/)
- [r/statistics](https://www.reddit.com/r/statistics/)
- [Bioconductor Support](https://support.bioconductor.org/)
:::
:::
---
## 速查表
### R基础速查
```r
# 帮助
?function # 查看函数帮助
??keyword # 搜索关键词
example(func) # 运行示例
# 数据结构
vector <- c(1, 2, 3)
matrix <- matrix(1:9, nrow = 3)
df <- data.frame(x = 1:3, y = c("a", "b", "c"))
list <- list(a = 1, b = "text")
# 索引
x[1] # 第一个元素
x[c(1, 3)] # 第1和第3个
df$column # 列访问
df[row, col] # 行列访问
# 常用函数
length(x) # 长度
dim(df) # 维度
str(df) # 结构
summary(df) # 摘要
```
### dplyr速查
```r
# 核心动词
df |> filter(x > 5) # 筛选
df |> select(x, y) # 选择列
df |> mutate(z = x + y) # 新建列
df |> summarise(mean_x = mean(x)) # 汇总
df |> group_by(category) # 分组
# 数据整合
df1 |> left_join(df2, by = "id") # 左连接
inner_join / full_join / anti_join # 其他连接
# 数据整理
df |> arrange(desc(x)) # 排序
df |> distinct() # 去重
df |> slice(1:10) # 切片
df |> sample_n(100) # 随机抽样
```
### ggplot2速查
```r
# 基本语法
ggplot(data, aes(x = xvar, y = yvar)) +
geom_point() + # 散点
geom_line() + # 线图
geom_bar() + # 柱状图
geom_histogram() + # 直方图
geom_boxplot() + # 箱线图
theme_bw() # 主题
# 常用aes
aes(color = group) # 颜色映射
aes(fill = group) # 填充映射
(aes(size = value)) # 大小映射
(aes(shape = type)) # 形状映射
# 标度与主题
scale_color_manual() # 自定义颜色
theme_minimal() # 简约主题
labs(title = "", x = "") # 标签
facet_wrap(~group) # 分面
```
---
## 学习建议
### 初学者路径
1. **第1-2周**:R基础语法与数据结构
2. **第3-4周**:tidyverse数据处理
3. **第5-6周**:ggplot2可视化
4. **第7-8周**:R Markdown报告编写
### 进阶路径
1. 学习函数式编程(purrr)
2. 掌握性能优化技巧
3. 学习R包开发
4. 深入了解S3/S4面向对象
### 实践建议
- 每天写代码,保持手感
- 阅读优秀项目的源码
- 参与开源项目
- 记录学习笔记(用R Markdown!)
---
## 贡献与反馈
发现错误或有建议?欢迎通过以下方式联系:
- 📧 邮箱:wangshx@csu.edu.cn
- 🐙 GitHub Issues:[提交Issue](https://github.com/WangLabCSU/courses/issues)
- 💬 课程讨论区:[进入讨论](https://github.com/WangLabCSU/courses/discussions)
---
**持续学习,永不止步!** 📚✨