Created
September 1, 2020 10:49
-
-
Save keithmcnulty/3f564462dc5bde1cf7c00990d4c765ce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(patchwork) | |
| # generate scatter for entire dataset | |
| p_all <- scatter_fn(penguins, bill_length_mm, bill_depth_mm, "All Species") | |
| # get species scatters from penguin_scatters dataframe | |
| for (i in 1:3) { | |
| assign(paste("p", i, sep = "_"), | |
| penguin_scatters$plot[i][[1]]) | |
| } | |
| # display nicely using patchwork in R Markdown | |
| p_all / | |
| (p_1 | p_2 | p_3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment