Description Usage Arguments Value Author(s) See Also Examples
It converts a Ryacas Symbolic Matrix to a Character Matrix in R.
1 2 |
x |
A symbolic matrix of class "yac_symbol". |
... |
not used |
A character matrix.
Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Create a character matrix
A1 <- matrix(c(1, 2, 3, "a", "b", "c"), ncol=2, nrow=3)
# [,1] [,2]
# [1,] "1" "a"
# [2,] "2" "b"
# [3,] "3" "c"
## Convert it to an Ryacas matrix for symbolic calculations
A2 <- sym(A1)
# {{1, a},
# {2, b},
# {3, c}}
## Convert it back to a character matrix
as.matrix(A2)
# [,1] [,2]
# [1,] "1" "a"
# [2,] "2" "b"
# [3,] "3" "c"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.