文章预览
tidyplots(1)介绍 官网教程首页 教程地址:https://jbengler.github.io/tidyplots/ tidyplots的目标是简化为科学工作者创建出版就绪图的过程。它允许使用一致和直观的语法逐步添加、删除和调整绘图组件。 测试数据-Cursor pro 安装 您可以从CRAN安装tidyplots的正式版本: install.packages( "tidyplots" ) 以及来自GitHub的开发版本 # install.packages("devtools") devtools::install_github( "jbengler/tidyplots" ) 用法 # 使用管道操作符 %>% 将数据传递给后续函数 study %>% # 创建基础图形 # x轴为treatment变量 # y轴为score变量 # 根据treatment分组上色 tidyplot(x = treatment, y = score, color = treatment) %>% # 添加均值条形图 # alpha=0.4设置条形图透明度为0.4 add_mean_bar(alpha = 0.4) %>% # 添加标准误差线 # 用于显示数据的变异程度 add_sem_errorbar() %>% # 添加蜂群
………………………………