jacobian: Compute Jacobian

View source: R/calculus.R

jacobianR Documentation

Compute Jacobian

Description

Compute Jacobian

Usage

jacobian(expr, vars)

Arguments

expr

'caracas expression'.

vars

variables to take derivative with respect to

See Also

score(), hessian() der()

Examples

if (has_sympy()) {
  x <- paste0("x", seq_len(3))
  def_sym_vec(x)
  y1 <- x1 + x2
  y2 <- x1^2 + x3
  y <- c(y1, y2)
  jacobian(y, x)
  u <- 2 + 4*x1^2
  jacobian(u, x1)
}

caracas documentation built on Oct. 17, 2023, 5:08 p.m.