Is there an easy way to calculate the derivative of non-liner functions that are give by data?
for example:
x = 1 / c(1000:1) y = x^-1.5 ycs = cumsu
There is also gradient from the pracma package.
gradient
grad <- pracma::gradient(ycs, h1 = x) plot(grad, col = 1)