title: R - Error when saving multiple plots in a loop
body: <p>I have a dataframe like this testframe, but much larger. </p>
  
  <pre><code>lat_area = seq (50, 40, -0.5)
  lon_area = seq (-10, 10, 0.5)
  grid_area = matrix(0, ncol=2, nrow=length(lon_area)*length(lat_area))
  grid_area[,2] = rep(lat_area, each=length(lon_area))
  grid_area[,1] = lon_area
  testframe = as.data.frame(grid_area)
  
  colnames(testframe) = c("Lon", "Lat")
  testframe$FDsw = rep(c(0.5,0.7), length.out= nrow(testframe))
  testframe$Thgf = rep(c(0.2,0.3), length.out= nrow(testframe))
  testframe$Igbff = rep(c(0.8,0.9), length.out= nrow(testframe))
  </code></pre>
  
  <p>I want to make contourplots for each data-column (columns 3:5 in the testframe)
  I found multiple question on how to save multiple plots automatially. the best way in my opinion is to save all plots in a list and then save them later from this list. My try is down below.</p>
  
  <pre><code>library(ggplot2)
  library(metR)
  
  plot_list = list()
  for (i in 3:length(testframe)) {
    wd = map_data("world") 
    LP = ggplot() 
    LP = LP + 
      geom_contour_fill(data = testframe, aes(x = Lon, y = Lat, z = colnames(testframe)[i]), breaks = MakeBreaks(0.1)) + 
      geom_contour(data = testframe, aes(x = Lon, y = Lat, z = colnames(testframe)[i]), color = "blue", size = 0.6) + 
      geom_text_contour(data = testframe, aes(x = Lon, y = Lat, z = colnames(testframe)[i]), stroke = 0.1) + 
      scale_fill_divergent() +
      geom_polygon(data = wd , aes(x = long, y = lat, group = group), colour="black", fill = NA) + 
      coord_cartesian(xlim = c(-10, 10), ylim = c(50, 40)) +
      scale_x_longitude(ticks = 10)+ scale_y_latitude(ticks = 10) +
      labs(title= paste("Plot", colnames(testframe)[i], sep = " ")) 
    plot_list[[i]] = LP}
  
  plot_list[1:2] = NULL
  names(plot_list) = colnames(testframe)[3:ncol(testframe)]
  
  
  for (i in 1:3) {
    file_name = paste("Plot", i, ".tiff", sep="")
    tiff(file_name)
    print(plot_list[[i]])
    dev.off()
  }           
  </code></pre>
  
  <p>I dont know what I am doing wrong. I am getting this error:</p>
  
  <pre><code>Error in UseMethod("fullseq") : 
    no applicable method for 'fullseq' applied to an object of class "character"
  In addition: Warning message:
  In pretty.default(range(data$z, na.rm = TRUE), 10) :
    NAs introduced by coercion
  </code></pre>
  
  <p>Does anyone know why this is not working?</p>