derivative {quantchem} | R Documentation |
Calculate derivative of polynomial for given x.
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 |
This function is called via the other high level functions, but it can be also called directly.
A vector of calculated derivatives.
Lukasz Komsta
x = 1:10 y = jitter(x+x^2) fit = lm(y~x+I(x^2)) derivative(fit,1:10)