powered by
derivative(obj, x)
y ~ x + I(x^2) + I(x^3) + ...
This function is called via the other high level functions, but it can be also called directly.
lm
x = 1:10 y = jitter(x+x^2) fit = lm(y~x+I(x^2)) derivative(fit,1:10)
Run the code above in your browser using DataLab