Skip to content

Instantly share code, notes, and snippets.

View erikerhardt's full-sized avatar

Erik Erhardt erikerhardt

View GitHub Profile
@erikerhardt
erikerhardt / f_ggplot_grid_workflow.R
Last active May 21, 2024 02:46
R ggplot plot and grid.arrange workflow
## Erik's workflow template for plots in R ggplot2
library(erikmisc) # https://github.com/erikerhardt/erikmisc/
# https://patchwork.data-imaginist.com/articles/guides/layout.html
# When lazy evaluation (nonstandard evaluation NSE) is an issue with plots into a list
# force evaluation by running cowplot (have not found a better way using force() or eval() or tidy_eval())
# p_list[[ i_plot ]] <- p |> cowplot::plot_grid()