jacobian(func, x, method="Richardson", method.args=list(), ...) ## S3 method for class 'default':
jacobian(func, x, method="Richardson",
method.args=list(eps=1e-4, d=0.0001,
zero.tol=sqrt(.Machine$double.eps/7e-7), r=4, v=2, show.details=FALSE), ...)
"Richardson" or "simple" indicating
the method to use for the approximation.grad.
(Arguments not specified remain with their default values.)func.jacobian calculates a numerical approximation of the
first derivative of func at the point x. Any additional
arguments in ...are also passed to func, but the gradient is not
calculated with respect to these additional arguments.
If method is "simple", the calculation is done using a simple epsilon
difference. For this case, only the methods.args element eps
is used. If method is "Richardson", the calculation is done by
Richardson's extrapolation. See link{grad} for more details.grad,
hessian,
numericDerivfunc2 <- function(x) c(sin(x), cos(x))
x <- (0:1)*2*pi
jacobian(func2, x)Run the code above in your browser using DataLab