`derivative(obj, x)`

obj

an object of class 'lm', fitted in

`y ~ x + I(x^2) + I(x^3) + ...`

way.x

a vector of x values

- A vector of calculated derivatives.

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)