title: What is the difference between aes and aes_string (ggplot2) in R
body: <p>With missing background in informatics I have difficulties to understand the differences between <code>aes</code> and <code>aes_string</code> in ggplot2 and its implications for daily usage.</p>
  
  <p>From the description (<code>?aes_string</code>) I was able to understand that both <code>describe how variables in the data are mapped to visual properties (aesthetics) of geom</code>. </p>
  
  <p>Furthermore it is said that <code>aes uses non-standard evaluation to capture the variable names.</code> whereas <code>aes_string</code> uses <code>regular evaluation</code>.</p>
  
  <p>From example code it is clear that both produce the same output (<code>a list of unevaluated expressions</code>):</p>
  
  <pre><code>&gt; aes_string(x = "mpg", y = "wt")
  List of 2
   $ x: symbol mpg
   $ y: symbol wt
  &gt; aes(x = mpg, y = wt)
  List of 2
   $ x: symbol mpg
   $ y: symbol wt
  </code></pre>
  
  <p><code>Non-standard evaluation</code> is described by <a href="http://adv-r.had.co.nz/Computing-on-the-language.html" rel="noreferrer">Hadley Wickham in his book <em>Advanced R</em></a> as a method to not only call the values of a functions argument but also the code that produced them. </p>
  
  <p>I would assume that <code>regular evaluation</code> in opposition only calls the values from the function, but I did not find a source to confirm this assumption. Furthermore it is unclear to me how those two differ and why this should be relevant to me when I use the package. </p>
  
  <p>On the <a href="http://www.inside-r.org/packages/cran/ggplot2/docs/aes_string" rel="noreferrer">inside-R website</a> it is mentioned that <code>aes_string is particularly useful when writing functions that create plots because you can use strings to define the aesthetic mappings, rather than having to mess around with expressions.</code></p>
  
  <p>But in that sense it is unclear to me why I should ever use <code>aes</code> and not opt always for <code>aes_string</code> whenever using <code>ggplot2</code>... In that sense it would help me to find some clarifications on those concepts and a practical hint for daily usage. </p>