Add prefix to each element of matrix
add_prefix(x, prefix = "")
Numeric or symbolic matrix
A character vector
if (has_sympy()) {
X <- matrix_sym(2, 3)
X
add_prefix(X, "e")
X <- matrix(1:6, 3, 2)
X
add_prefix(X, "e")
}
#> c: ⎡e₁ e₄⎤
#> ⎢ ⎥
#> ⎢e₂ e₅⎥
#> ⎢ ⎥
#> ⎣e₃ e₆⎦