symbol_is_matrix {caracas} | R Documentation |
Check if object is a caracas matrix
Description
Check if object is a caracas matrix
Usage
symbol_is_matrix(x)
Arguments
x |
An object |
Examples
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
}
[Package caracas version 2.1.1 Index]