How to save and name multiple plots with R
问题 I have a list of 73 data sets generated by the function "mcsv_r()" called "L1" and a function "gc()" that generates a map. Using "lapply" I can create my 73 plots. I need to save and name all of them. I know I can do it one by one with RStudio. But I am sure that thanks to "jpeg()" and "dev.off" and mixing them with a loop I can do it with a few lines of code. out <- setwd("C:/") dir(out) mcsv_r(dir(out)) gc <- function(x){ xlim <- c(-13.08, 8.68) ylim <- c(34.87, 49.50) map("world", lwd=0.05