Learn R Programming

caracas (version 2.1.1)

print.caracas_solve_sys_sol: Print solution

Description

Print solution

Usage

# S3 method for caracas_solve_sys_sol
print(
  x,
  simplify = getOption("caracas.print.sol.simplify", default = TRUE),
  ...
)

Arguments

x

A caracas_symbol

simplify

Print solution in a simple format

...

Passed to print.caracas_symbol()

Examples

Run this code
if (has_sympy()) {
  x <- symbol('x')
  solve_sys(x^2, -1, x)
  
  y <- symbol("y")
  lhs <- cbind(3*x*y - y, x)
  rhs <- cbind(-5*x, y+4)
  sol <- solve_sys(lhs, rhs, list(x, y))
  sol
}

Run the code above in your browser using DataLab