How to add a tree to a heatmap with ggplot2 (CC418)
Riffomonas Project
0:00 / 0:00
How to add a tree to a heatmap with ggplot2 (CC418)
592 просмотра · Трансляция закончилась 4 месяца назад
Riffomonas Project
27,5 тыс. подписчиков
592 просмотра · Трансляция закончилась 4 месяца назад
In this livestream, Pat recreates a set of heatmaps with a dendrogram from a paper published in the journal Nature Microbiology. He created the figure using R, readxl, dplyr, ggplot2, ggtext, showtext, patchwork, ggdendro, and other tools from the tidyverse. The functions he used from these packages included aes, as.dendrogram, as.dist, case_when, colnames, colorRampPalette, column_to_rownames, coord_cartesian, dendro_data, download.file, dup_axis, element_blank, element_markdown, element_text, factor, filter, font_add_google, function, geom_segment, geom_tile, ggplot, hclust, label, labs, length, library, margin, mutate, ncol, pivot_longer, pivot_wider, plot_annotation, plot_layout, read_excel, rename, rename_all, rev, sample_b = , scale_fill_gradientn, scale_fill_manual, scale_x_continuous, scale_y_continuous, segment, seq_along, showtext_auto, showtext_opts, sum, and unit. The code that Pat generated in this episode can be found at https://riffomonas.org/code_club/2026.... The original Nature Microbiology article can be found at https://www.nature.com/articles/s4156.... His critique of the visualization can be seen at • What goes wrong when there's too much data... . 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/...