title: R barplots in a loop and save them to a file
body: <p>I want to make multiple barplots by using a for loop, and save the plots as seperate .bmp files.</p>
  
  <p>I start from a list of data frames (covpatient). I know how to make a single barplot, but I don't know how to put them in a for loop &amp; save the results.</p>
  
  <pre><code>for (i in 1:length(covpatient)) {
         filename = paste(covpatient[[1]]$gene[1],"bmp", sep = ".")
         barplot ... OK
         print(?)
         dev.off()
  }
  </code></pre>
  
  <p>Could someone give me a hand?</p>