Symbolic matrix

matrix_(..., declare_symbols = TRUE)

Arguments

...

Passed on to matrix()

declare_symbols

Passed on to as_sym() when constructing symbolic matrix

Examples

if (has_sympy()) {
  matrix_(1:9, nrow = 3)
  matrix_("a", 2, 2)
}
#> c: ⎡a  a⎤
#>    ⎢    ⎥
#>    ⎣a  a⎦