How to use R to create a heatmap from a distance matrix with ggplot2 (CC209)

May 2, 2022 • PD Schloss • 1 min read

In this Code Club, Pat shows how to generate a heatmap in R from a distance matrix generated using vegan. He starts with making a heatmap for a Bray-Curtis distance matrix and then incorporates Jaccard distances for the same data. Along the way he provides a critique of this approach to visualizing distances between samples. He’ll demonstrate this approach by using functions from vegan, dplyr, and ggplot2.

Code

You can browse the state of the repository at the

comments powered by Disqus