Estimate first or second derivatives for dy/dx.
deriv.Rd
Uses central differencing where possible.
Arguments
- x
x variable. Does not need to be evenly spaced.
- y
y variable.
- ord
Order of the derivative (1 or 2).
- method
Method for taking second derivatives. Either
'direct' (default) Uses a direct formula, based on a central difference of forward and backward differences, from https://mathformeremortals.wordpress.com/2013/01/12/a-numerical-second-derivative-from-three-points/
'repeat' Repeat two first derivatives.