title: Draw geom_smooth only for fits that are significant
body: <p>How can I make ggplot plot geom_smooth(method="lm"), but only if it fits some criteria? For instance, if I only want to draw lines if the slope is statistically significant (i.e. <em>p</em> from the <code>lm</code> fit is less than 0.01).</p>
  
  <p>EDIT: Updated to a more complex example involving facets. Instead of generating the data from scratch, I modified the <code>diamonds</code> data set.</p>
  
  <pre><code>library(ggplot2)
  library(data.table)
  
  data(diamonds)
  
  set.seed(777)
  d &lt;- data.table(diamonds)
  d[color %in% c("D","E"), c("x","y") := list(x + runif(1000, -5, 5),
                                              y + runif(1000, -5, 5))] 
  plt &lt;- ggplot(d) + aes(x=x, y=y, color=color) + 
      geom_point() + facet_grid(clarity ~ cut, scales="free")
  plt + geom_smooth(method="lm")
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/CnnBe.png" alt="enter image description here"></p>
  
  <p>What I would like is a way to plot all lines except those which do not have statistically significant slopes (i.e. D and E).</p>