Returns the numerical partial derivative of y wrt x for a point of interest.
Usage
dy.dx(x, y, eval.point = median(x))
Value
Returns a list of both 1st and 2nd derivative:
dy.dx(...)$First the 1st derivative.
dy.dx(...)$Second the 2nd derivative.
Arguments
x
a numeric vector.
y
a numeric vector.
eval.point
numeric or ("overall"); x point to be evaluated. Defaults to (eval.point = median(x)). Set to (eval.point = "overall") to find an overall partial derivative estimate (1st derivative only).
if (FALSE) {
x <- seq(0, 2 * pi, pi / 100) ; y <- sin(x)
dy.dx(x, y, eval.point = 1.75)
# Vector of derivativesdy.dx(x, y, eval.point = c(1.75, 2.5))
}