diag-set-.caracas_symbol: Replace diagonal

diag<-.caracas_symbolR Documentation

Replace diagonal

Description

Replace diagonal

Usage

## S3 replacement method for class 'caracas_symbol'
diag(x) <- value

Arguments

x

A caracas_symbol.

value

Replacement value

Examples

if (has_sympy()) {
  A <- matrix(c("a", 0, 0, 0, "a", "a", "a", 0, 0), 3, 3)
  B <- as_sym(A)
  B
  diag(B)
  diag(B) <- "b"
  B
  diag(B)
}


caracas documentation built on June 22, 2024, 10:59 a.m.