View source: R/lin_alg.R View source: R/coerce.R
symbol_is_matrix | R Documentation |
Check if object is a caracas matrix
symbol_is_matrix(x)
x |
An object |
if (has_sympy() && sympy_version() >= "1.6") {
x <- vector_sym(4)
symbol_is_matrix(x) ## TRUE
x2 <- as.character(x) ## "Matrix([[v1], [v2], [v3], [v4]])"
symbol_is_matrix(x2) ## TRUE
x3 <- as_character_matrix(x) ## R matrix
symbol_is_matrix(x3) ## FALSE
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.