Using ggplot2's facet_wrap to create three panelled figure in R (CC311)
Riffomonas Project
0:00 / 0:00
Using ggplot2's facet_wrap to create three panelled figure in R (CC311)
1 030 просмотров · 1 год назад
Riffomonas Project
27,5 тыс. подписчиков
1 030 просмотров · 1 год назад
Pat does a data viz makeover to convert a two panelled figure into a three panelled figure using facet_wrap from the ggplot2 R package. He customizes the appearance using pivot_longer, geom_boxplot, geom_segment, geom_text, geom_hline, scale_y_continuous, coord_cartesian, labs, and theme functions. You can find the code he developed in this episode at https://www.riffomonas.org/code_club/.... The original figure was published in the journal mBio (https://journals.asm.org/doi/10.1128/... Pat recreated Figure 1. The newsletter describing how I would go about generating the figure can be found at https://shop.riffomonas.org/posts/fun....
If you have a figure that you would like to see me discuss in a future newsletter and episode of Code Club, email me at pat@riffomonas.org!
Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at https://shop.riffomonas.org/youtube to get practice problems, tips, and insights. If you're interested in purchasing a video workshop be sure to check out https://riffomonas.org/workshops/
Support Riffomonas by becoming a Patreon member!
/ riffomonas
You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/
If you want to cite this video, please consider citing https://journals.asm.org/doi/10.1128/...
0:00 Introduction
3:50 Creating faceted box plots
8:57 Using facet label as y-axis title
12:19 Setting and formatting x and y-axis titles
17:02 Setting y-axis limits
19:33 Adding indicators of significance
25:52 Formatting x-axis lines