title: Generate histograms out of dplyr pipe
body: <p>I have a dataset that I want to <code>group_by()</code> and generate a histogram for each group. My current code is as follows:</p>
  
  <pre><code>df %&gt;%
    group_by(x2) %&gt;%
    with(hist(x3,breaks = 50))
  </code></pre>
  
  <p>This however generates a single histogram of the entirety of x3 rather than several chunks of x3 here is some example data</p>
  
  <pre><code>df = data.frame(x1 = rep(c(1998,1999,2000),9),
              x2 = rep(c(1,1,1,2,2,2,3,3,3),3),
              x3 = rnorm(27,.5))
  </code></pre>
  
  <p>desired output: </p>
  
  <p><a href="https://i.stack.imgur.com/QOT0i.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QOT0i.jpg" alt="enter image description here"></a></p>
  
  <p>actual output:</p>
  
  <p><a href="https://i.stack.imgur.com/vWDU3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vWDU3.jpg" alt="enter image description here"></a></p>