I like how terse is to create and save plots using Purrr. It is explained with an example in R for Data Science. I slightly modified the example to make a version using dplyr:

library(tidyverse)

plots <- mtcars %>% 
  group_by(cyl) %>% 
  nest() %>% 
  mutate(plot = map(data, ~ggplot(., aes(mpg, wt)) + geom_point()),
         filename = paste0(cyl, ".pdf")) %>% 
  select(filename, plot)

pwalk(plots, ggsave, path =  getwd())