第 10 章 统计书籍
10.1 R-统计书籍
10.1.1 tidyverse相关
## 使用tidyverse流来构建数据清洗、整理、建模及可视化流程:
https://moderndive.com/index.html
## 使用tidyverse进行数据统计的最关键书籍 -R 数据科学
https://r4ds.had.co.nz/
## The tidyverse style guide 编程风格指南;
https://style.tidyverse.org/index.html
## Modern R with the tidyverse
## 包含Rstudio介绍、函数、数据统计、图表、统计建模、R包开发和标准化报告等;
https://b-rodrigues.github.io/modern_R/
## 《R语言编程—基于tidyverse》 -张敬信-统计学教师
https://zhuanlan.zhihu.com/p/198185888
10.1.2 ggplo2相关-网站
## poltly:交互式R视图
# 提供海量R图形和对应的R代码
https://chart-studio.plotly.com/feed/#/
## The R Graph Gallery
这是使用R 编程语言 制作的图表集合,画廊将重点放在 tidyverse 和ggplot2上
https://www.r-graph-gallery.com/
## R代码图表编辑指南:
# 提供大量的图表及原始代码;还包括BASE R、ggplot2和颜色的各种图表设置
https://r-charts.com/
## GGPLOT2最经常绘制的50种图形:
http://r-statistics.co/Top50-Ggplot2-Visualizations-MasterList-R-Code.html
10.1.3 绘图指南
## Data Visualization with R
# 单变量图、多元变量图、地图、时间相关图、统计出图、交互式图表和其他特殊图表:
https://rkabacoff.github.io/datavis/
## Fundamentals of Data Visualization
# 包含数据可视化的类型、数据可视化的原则和误区,以及其他补充
https://clauswilke.com/dataviz/
## 数据可视化实用的介绍 Data Visualization A practical introduction
## 包含ggplot2的设计美感、各种绘图参数设计以及绘图优化等
https://socviz.co/index.html#preface
## ggplot2的绘图指南:
# 这是Springer 出版的“ggplot2:用于数据分析的优雅图形”的第 3 版正在进行中的在线版本。
https://ggplot2-book.org/index.html
10.1.4 绘图相关的博客
## 目前最全的R语言-图片的组合与拼接
https://www.jianshu.com/p/fcfc3c7cb4e0
## R---plot()参数详解
https://www.jianshu.com/p/419d84e83548
10.1.5 医学指南相关
############ 纯统计相关 ####################
## 医学统计学:偏理论公式推导-无代码;
https://wangcc.me/LSHTMlearningnote/index.html
## 医学统计学-读书笔记:
# 某个医学研究生的读书笔记:偏向于理论公式推导
https://bookdown.org/wxhyihuan/Notebook-of-medical-statistics-1605856202966/
## Prism 9 统计指南 - 统计学原理
http://www.graphpad-prism.cn/guides/prism/9/statistics/stat_---_principles_of_statistics_-.htm
############ R代码实现统计相关 ####################
## 临床医学统计-偏R代码实现;
https://bookdown.org/jbrophy115/bookdown-clinepi/
## (Mostly Clinical) Epidemiology with R
# 数据分析、关联、统计推断、临床设计、因果推断、混杂因素、偏差分析、分类、
https://bookdown.org/jbrophy115/bookdown-clinepi/
## 使用 R 进行可重复的医学研究 -- 很重要的一本书
# 数据清洗、临床统计、样本量计算、随机化、可视化
https://bookdown.org/pdr_higgins/rmrwr/
## 科研者之家提供的部分医学相关的R代码实现统计知识:
https://www.home-for-researchers.com/static/index.html#/
## 流行病学家 R 手册 R for applied epidemiology and public health
https://epirhandbook.com/en/index.html
## 提供简易的R医学课程指导,包括最常用的cox回归等知识;
https://argoshare.is.ed.ac.uk/healthyr_book/
## R实现分组调查设计和分析:
Survey Design and Analysis
https://bookdown.org/mpfoley1973/survey/#the-survey-package
## 提供是生存分析,多种回归的优化解析方案:
https://argoshare.is.ed.ac.uk/healthyr_book/summary-2.html
10.1.6 医学统计R包
## 2021年八月:新的 CRAN 医学软件包的“前 40 名”精选 --这个还需要更仔细研究下
https://rviews.rstudio.com/2021/08/12/r-medicine-2021/
10.1.7 医学统计相关博客
## 简书中提供的大量关于医学统计相关的信息:
https://www.jianshu.com/search?q=%E4%B8%B4%E5%BA%8A%E6%95%B0%E6%8D%AE%E7%BB%9F%E8%AE%A1%E5%88%86%E6%9E%90&page=1&type=note
## 真实世界研究相关的资料:
# 超越数据——了解 RWE 如何应用于肿瘤学研究和药物开发。
https://rwe.flatiron.com/
## 医学统计学相关的课程全集:--医垰会
https://www.mediecogroup.com/zhuanlan/lessons/772/?utm_source=wechat1211
10.1.8 统计指南-R代码实现
## 高级统计建模(课程代码):--R代码实现:
https://www.stat.cmu.edu/~cshalizi/ADAfaEPoV/
https://www.stat.cmu.edu/~cshalizi/mreg/15/
https://adv-r.hadley.nz/index.html
http://adv-r.had.co.nz/Functional-programming.html
https://stat545.com/functions-part1.html
https://bookdown.org/rdpeng/RProgDA/advanced-r-programming.html
https://discdown.org/rprogramming/functions.html
## 因果数据科学指南:
https://tlverse.org/tlverse-handbook/index.html
## 聚合大量统计学知识:-附R代码实现;
https://rcompanion.org/handbook/K_01.html
## 主要参考书籍:数据科学的 R 编程 R Programming for Data Science
## 建议日常打开放在网页中使用:
# 包含:数据存储、数据分组、时间、dplyr、循环控制函数、字符正则、代码优化、
# 数值模拟、并行计算;
https://bookdown.org/rdpeng/rprogdatascience/
10.1.9 数据建模相关
## 使用 brms、ggplot2 和 tidyverse重新思考统计数据
https://bookdown.org/content/c23e1ece-b5d6-4cab-8d8e-978c2e5b7a53/
## 快速入门 | mlr3 书
https://mlr3book.mlr-org.com/
10.1.10 整合流程
## quick R 数据输入 数据管理 统计数据 高级统计 图表
https://www.statmethods.net/stats/withby.html
## 数据输入 数据管理 统计数据 高级统计 图表 大数据框架
https://techvidvan.com/tutorials/r-hadoop-integration/
## R语言忍者秘笈-数据结构、文本、自动化报告、编写R包;
https://bookdown.org/yihui/r-ninja/
## 全学科的R统计指南:简称R大书,包含各个学科知识体系:
https://www.bigbookofr.com/
## R语言教程-李东风教授中文版-用于统计课程教学
# 包括:变量、函数、标准化报告和数据统计、绘图、统计建模、文本处理等
https://www.math.pku.edu.cn/teachers/lidf/docs/Rbook/html/_Rbook/index.html
## 高级R ADVANCE R
## 提供大量R 的高阶优化知识,主要包括函数优化和面向对象编程
https://adv-r.hadley.nz/index.html
## 在线书籍pdf:Hands-On Programming with R
## 提供数据输入 数据管理 统计数据 高级统计 图表
https://d1b10bmlvqabco.cloudfront.net/attach/ighbo26t3ua52t/igp9099yy4v10/igz7vp4w5su9/OReilly_HandsOn_Programming_with_R_2014.pdf
## 整洁R代码:特点是包括训练与预测、评估与调优
https://datasciencebook.ca/
## Cookbook for R 中文版
https://www.bookstack.cn/read/Cookbook-for-R-Chinese/040fb5e44c703675.md
10.1.11 博客社区
## R的博客社区-共享书籍:
://rviews.rstudio.com/2021/11/04/bookdown-org/
https
## R的博客社区-可提供会议链接和最新的共享代码资源:
://rviews.rstudio.com/
https
## rmarkdwon编写的统计指南,包含大量R的最新指南信息
://rpubs.com/
https
## 提供海量基于markdown格式写的R相关书籍;
://bookdown.org/
https
## R-博客,提供大量与R相关的博客知识;
://www.r-bloggers.com/
https
## 中文:统计之都
://cosx.org/ https
10.1.12 Rmarkdown
## R Markdown Reference Guide
https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf?_ga=2.258283010.941366294.1644810156-143414957.1644300675
## R Markdown Cookbook
# Yihui Xie, Christophe Dervieux, Emily Riederer
# 非常详细且完善;
https://bookdown.org/yihui/rmarkdown-cookbook/
## R Markdown: The Definitive Guide
# Yihui Xie, J. J. Allaire, Garrett Grolemund
# 更完善的构建文档,包含各个类型文档编写的形式;
https://bookdown.org/yihui/rmarkdown/
10.2 使用gitbook写书
## 如何使用gitbook来写书;
https://blog.csdn.net/weixin_39637597/article/details/104456912?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-2&spm=1001.2101.3001.4242
## gitbook使用指南:
安装:
首先安装nodejs;
然后使用rpm安装gitbook;
npm install -g gitbook-cli
gitbook -V ## 会自动查看gitbook并更新软件;
## 初始化命令:
gitbook init 生成两个初始文件;readme.md对书籍的简单介绍;summary为书籍目录结构;
gitbook server:预览书目;
## 构建目录:
gitbook子目录写作:
* [zilu](zilu.md)
- [zilu](zilu.md)
- (hrttps)
## 安装插件:
在该文件夹下生成book.json文件;
并在npm下搜索相关插件的命令(https://www.npmjs.com/),把对应的代码复制到上面即可;
复制完代码后执行, gitbook install 安装对应的插件;
最后,在进行gitbook serve即可;
# 对应的添加评论插件;
https://www.npmjs.com/package/gitbook-plugin-comments-footer
## 其他可能有用的;
gitbook-plugin-donate(打赏按钮): https://www.npmjs.com/package/gitbook-plugin-donate
gitbook-plugin-github-buttons(GitHub按钮): https://www.npmjs.com/package/gitbook-plugin-github-buttons
gitbook-plugin-edit-link(GitHub编辑按钮): https://www.npmjs.com/package/gitbook-plugin-edit-link
## 命令合集:
gitbook init //初始化目录文件
gitbook help //列出gitbook所有的命令
gitbook --help //输出gitbook-cli的帮助信息
gitbook build //生成静态网页
gitbook serve //生成静态网页并运行服务器
gitbook build --gitbook=2.0.1 //生成时指定gitbook的版本, 本地没有会先下载
gitbook ls //列出本地所有的gitbook版本
gitbook ls-remote //列出远程可用的gitbook版本
gitbook fetch 标签/版本号 //安装对应的gitbook版本
gitbook update //更新到gitbook的最新版本
gitbook uninstall 2.0.1 //卸载对应的gitbook版本
gitbook build --log=debug //指定log的级别
gitbook builid --debug //输出错误信息
## 相关插件:
# 常用插件推荐:
https://blog.csdn.net/qq_37149933/article/details/64170653?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_utm_term~default-1.searchformbaiduhighlight&spm=1001.2101.3001.4242
disqus
添加 disqus 评论插件。
* [介绍](README.md)
- [next](zil.md)
## 插件的参考写作方法:
{
"title": "编写gitbook电子书教程",
"description": "gitbook电子书教程",
"author": "sphard",
"language": "zh-hans",
"root": ".",
"plugins": [
"donate",
"github-buttons@2.1.0",
"edit-link"
],
"pluginsConfig": {
"donate": {
"wechat": "https://sphard.com/images/wechatpay.jpg",
"alipay": "https://sphard.com/images/alipay.jpg",
"title": "",
"button": "打赏",
"alipayText": "支付宝打赏",
"wechatText": "微信打赏"
},
"github-buttons": {
"repo": "darrenliuwei/gitbook",
"types": [
"star"
],
"size": "small"
},
"edit-link": {
"base": "https://github.com/darrenliuwei/gitbook/edit/master",
"label": "Edit This Page"
}
}
}
## gitbook写作知识进阶
https://www.jianshu.com/p/a3f2316aee77
## 相关报错解决:
# Gitbook错误cb.apply isnotafunction的解决办法
根据报错路径找到`cb.apply`相关的函数全部注释掉即可;
10.3 使用bookdwon写书
10.3.1 常用功能标记
10.3.2 R代码的构建
## [1] 2
## [1] -1.76920533 -0.78936774 0.04017023 -1.36672421 -0.40089046 -0.33401977
## [7] 0.85150096 -1.39108964 -1.56090217 -0.02001170

图 10.1: A figure caption.
10.3.4 引入shiny应用
knitr::include_url()
# 或者:
knitr::include_app("https://yihui.shinyapps.io/miniUI/",
height = "600px")