title: Alternative to print() to save multiple ggplots stored inside a variable in R
body: <p>I have generated around 1,000 ggplots inside a single variable (<code>all_plots</code>, a list of plots).
  The only way I found to save all of them in a single pdf file is:</p>
  <pre><code>pdf()
  print(all_plots)
  dev.off()
  </code></pre>
  <p>But this ends up being really slow nullifying the efforts I put in speeding the code up.</p>
  <p>I also tried to <code>lapply()</code> the <code>print()</code> function to <code>all_plots</code> but it does not improve it.</p>
  <p><code>ggsave</code> does not deal with lists.</p>
  <p>I would like to avoid <code>for</code> loops.</p>
  <p>Do you have any suggestions?</p>
  <p>Thanks for your time fools. <code>:)</code></p>