title: Calculate the derivative of a data-function in r
body: <p>Is there an easy way to calculate the derivative of non-liner functions that are give by data?</p>
  
  <p>for example:</p>
  
  <pre><code>x = 1 / c(1000:1)
  
  y = x^-1.5
  ycs = cumsum(y)
  
  plot (x, ycs, log="xy")
  </code></pre>
  
  <p>How can I calculate the derivative function from the function given by ´x´ and ´ycs´?</p>