title: "Replacement has n rows, data has p" error message with loess()
body: <p>This question is related <a href="https://stackoverflow.com/questions/36315152/continuous-quantiles-of-a-scatterplot#comment60283983_36315595">to this one</a>.</p>
  <p>I'm trying to use <code>loess()</code> inside <code>ggplot2</code>'s <code>stat_smooth()</code>, this way :</p>
  <pre><code>ggplot(data = mydf, aes(x=time, y=pdm, z=surface))
      + geom_point() + stat_smooth(col=&quot;red&quot;) 
      + stat_quantile(formula = loess(mydf$pdm ~ mydf$time), quantiles = c(0.25, 0.5, 0.75))
  </code></pre>
  <p>However, I get the following error message :</p>
  <blockquote>
  <p>Warning messages:</p>
  <p>1: 'newdata' had 100 rows but variables found have 6816 rows</p>
  <p>2: Computation failed in 'stat_quantile()':</p>
  <p>replacement has 6816 rows, data has 100</p>
  </blockquote>
  <p>Any idea of what is going on / how to get it to work ?</p>
  <p>Thanks</p>