Visualizing correlation with double y-axes using the ggplot2 R package (CC235)
Should you visualize your data using double y-axes? In this Code Club, Pat will show how to assess correlations using ggplot2 using faceted line plots, line plots on double y-axes, and using a scatter plot. Finally, he’ll use cor.test to statistically assess the correlation between two variables. As always, there’s a lot of other great gems to be found in the episode.
Code
You can browse the state of the repository at the
- beginning of the episode
- end of the episode
- corrected bugs - There are some extra files in here since I needed to correct several bugs after recording other episodes