Unsure of what tags to use here, I guess it's just base R?
Small code block within and Rmd file:
mod <- glm(formula = price ~ carat, family = "poisson", data = diamonds)
par(mfrow = c(2,2))
mod_fit_plot <- mod %>% plot
When running this I see a single plot displayed with 4 facets or 'chartlets' as desired:
However, if I subsequently type model_fit_plot
into the console, it comes back NULL. Expected to see the plot print again in the plots pane.
How can I save my plot as a variable?