title: Using lapply to make boxplots of a variable list
body: <p>I want this type of boxplot for several y-variables in my dataset: <a href="https://i.stack.imgur.com/KgWSC.png" rel="nofollow noreferrer">normal boxplot for all irises with Species as x-value</a>. Since I have multiple y variables to plot, I tried to use lapply like this:</p>
  <pre><code>varlist &lt;- c('Sepal.Length', 'Sepal.Width')
  
  plot &lt;- function (varlist) {
    require(ggplot2)
    ggplot(data = iris, aes(x=Species, y=varlist))+
      geom_boxplot() 
  }
  
  lapply(varlist, FUN = plot)
  </code></pre>
  <p>I got this plot:
  <a href="https://i.stack.imgur.com/Y1mDk.png" rel="nofollow noreferrer">with only one iris per plot</a></p>
  <p>How can I get normal boxplots using a type of loop (because of several y-values), and where all irises grouped by the x-variable are included in the boxes?</p>