Creating multiple ggplots with dplyr
问题 After creating a plot matrix using GGally::ggpairs() , I would like to store the individual scatter plots for later use. Here is my current code: # load necessary package library(GGally) # loads `ggplot2` library(magrittr) # allows for the use of `%>%` # create a matrix of plots mtcars %>% na.omit() %>% ggpairs(columns = 1:7) # how do I automate this process? P1 <- ggplot(aes(x = disp, y = hp)) + geom_point() P2 <- ggplot(aes(x = drat, y = hp)) + geom_point() P3 <- ggplot(aes(x = hp, y = qsec