title: How to add expressions to labels in facet_wrap?
body: <p>I have a dataset from which I would like to plot small multiples, specifically in a 2-by-2 array, like this:</p>
  
  <pre><code>mydf &lt;- data.frame(letter = factor(rep(c("A", "B", "C", "D"), each = 20)), x = rnorm(80), y = rnorm(80))
  ggplot(mydf, aes(x = x, y = y)) + geom_smooth(method = "lm") + geom_point() + facet_wrap(~ letter, ncol = 2)
  </code></pre>
  
  <p>However, I want each facet label to include an expression, such as</p>
  
  <pre><code>expression(paste("A or ", alpha))
  </code></pre>
  
  <p>I can make this happen using <code>facet_grid()</code> via</p>
  
  <pre><code>f_names &lt;- list('A' = expression(paste("A or ", alpha)), 'B' = expression(paste("B or ", beta)), 'C' = expression(paste("C or ", gamma)), 'D' = expression(paste("D or ", delta)))
  f_labeller &lt;- function(variable, value){return(f_names[value])}
  ggplot(mydf, aes(x = x, y = y)) + geom_smooth(method = "lm") + geom_point() + facet_grid(~ letter, labeller = f_labeller)
  </code></pre>
  
  <p>But then I lose the 2-by-2 array.  How can I rename the <code>facet_wrap()</code> facet labels with an expression?  Or, how can I solve this by recreating the 2-by-2 array using <code>facet_grid()</code>, but only faceting by a single variable?</p>
  
  <p>(This question builds off of the parenthetical note in @baptiste's answer to <a href="https://stackoverflow.com/questions/10151123/how-to-specify-columns-in-facet-grid-or-how-to-change-labels-in-facet-wrap">this previous question</a>.)</p>
  
  <p>Thanks!</p>