Differentiate node x
with respect to node y
by numerical differentiation.
approx_grad(x, y, index = 1, eps = 1e-04)
character scalar, name of the node.
character scalar, name of the node.
numeric scalar, index of the target node that is differentiated. Defaults to the first element.
numeric scalar, step size. Defaults to 1e-4.
numeric vector or array, the derivative of x
with respect to y
.