title: ggplot thinks aesthetic wasn't made via `aes()`, but it was
body: <p>I use <code>ggplot2</code> pretty regularly, and I have to say this one has me befuddled.  </p>
  
  <p>Script is:</p>
  
  <pre><code>library(tidyverse)
  
  data_frame(value = rbinom(n = 100, size = 100, prob = 0.3)) %&gt;%
    ggplot(mapping = aes(x = value)) %&gt;%
    geom_histogram()
  
  sessionInfo()
  </code></pre>
  
  <p>Output is:</p>
  
  <pre><code>&gt; library(tidyverse)
  Loading tidyverse: ggplot2
  Loading tidyverse: tibble
  Loading tidyverse: tidyr
  Loading tidyverse: readr
  Loading tidyverse: purrr
  Loading tidyverse: dplyr
  Conflicts with tidy packages -------------------------------------------------------
  filter(): dplyr, stats
  lag():    dplyr, stats
  &gt; 
  &gt; data_frame(value = rbinom(n = 100, size = 100, prob = 0.3)) %&gt;%
  +   ggplot(mapping = aes(x = value)) %&gt;%
  +   geom_histogram()
  Error: Mapping must be created by `aes()` or `aes_()`
  &gt; 
  &gt; sessionInfo()
  R version 3.3.2 (2016-10-31)
  Platform: x86_64-apple-darwin13.4.0 (64-bit)
  Running under: macOS Sierra 10.12.1
  
  locale:
  [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] dplyr_0.5.0     purrr_0.2.2     readr_1.0.0     tidyr_0.6.0     tibble_1.2     
  [6] ggplot2_2.2.1   tidyverse_1.0.0
  
  loaded via a namespace (and not attached):
   [1] Rcpp_0.12.8      assertthat_0.1   R6_2.2.0         grid_3.3.2      
   [5] plyr_1.8.4       DBI_0.5-1        gtable_0.2.0     magrittr_1.5    
   [9] scales_0.4.1     lazyeval_0.2.0   tools_3.3.2      munsell_0.4.3   
  [13] colorspace_1.3-2
  </code></pre>