title: Looping over variables in ggplot
body: <p>I want to use ggplot to loop over several columns to create multiple plots, but using the placeholder in the for loop changes the behavior of ggplot.</p>
  
  <p>If I have this:</p>
  
  <pre><code>t &lt;- data.frame(w = c(1, 2, 3, 4), x = c(23,45,23, 34), 
  y = c(23,34,54, 23), z = c(23,12,54, 32))
  </code></pre>
  
  <p>This works fine:</p>
  
  <pre><code>ggplot(data=t, aes(w, x)) + geom_line()
  </code></pre>
  
  <p>But this does not:</p>
  
  <pre><code>i &lt;- 'x'
  ggplot(data=t, aes(w, i)) + geom_line()
  </code></pre>
  
  <p>Which is a problem if I want to eventually loop over x, y and z. 
  Any help?</p>