title: ggplot does not work in function, passing in variable names as strings
body: <p>I have following simple function but its ggplot command does not work. The command works all right when given from command line: </p>
  
  <pre><code>&gt; testfn &lt;- function(gdf, first, second){          
     library(ggplot2) 
     print(ggplot(gdf, aes(first, second)) + geom_point()) 
  }                                                                                              
  &gt;
  &gt; testfn(mydataf, vnum1, vnum2)   
      Error in eval(expr, envir, enclos) : object 'second' not found
  &gt; 
  &gt; ggplot(mydataf, aes(vnum1, vnum2)) + geom_point()
  
  &gt;  (plots graph without any error)
  </code></pre>
  
  <p>I tried to use <code>aes_string</code> instead of <code>aes</code>; and also using <code>x=first, y=second</code>.  Things improve and one point is plotted! X and Y axes show numbers related to that point as the label. Only the first row is being plotted. Where is the problem. Thanks for your help.</p>