本次主要介紹了一些基本的正則表達式用法,然後介紹使用 tidyverse 組合拳進行批量建模和可視化。
本文代碼和資料部分涉及的鏈接請訪問 https://xsliulab.github.io/Workshop/ 第四期內容。
資料:
內容:
- 字符處理基礎
常見需求
-
基礎字符串處理函數
-
映射
- 因子
- 手動
-
stringr 常用函數
-
建模基礎:參考 https://www.jianshu.com/p/f8ce25fb2697
因變量與自變量
y ~ x
-
公式表示
- 字符串轉公式
- https://openbiox.github.io/Cookbook-for-R-Chinese/section-4.html
- 實戰:結合 tidyverse 對 mtcars 進行批量建模和生成 ggplot2 圖形
- 編程將變量名組合轉爲公式
- 目標數據結構與生成
- 分組處理
- purrr 批量建模與可視化
- 圖形拼接