title: How can I use spline() with ggplot?
body: <p>I would like to fit my data using spline(y~x) but all of the examples  that I can find use a spline with smoothing,  e.g. lm(y~ns(x), df=_). </p>
  
  <p>I want to use <code>spline()</code> specifically because I am using this to do the analysis represented by the plot that I am making.</p>
  
  <p>Is there a simple way to use spline() in ggplot?</p>
  
  <p>I have considered the hackish approach of fitting a line using </p>
  
  <pre><code>geom_smooth(aes(x=(spline(y~x)$x, y=spline(y~x)$y))
  </code></pre>
  
  <p>but I would prefer not to have to resort to this.</p>
  
  <p>Thanks!</p>