as.symMatrix | R Documentation |
It converts a character matrix with starting values to a character matrix without the starting values.
as.symMatrix(x)
x |
A character or numeric matrix or a list of character or numeric matrices. |
If there are non-numeric values in x
, they are treated
as the labels of the free parameters. If a "*" is
present, the numeric value on the left-hand side will be treated as
the starting value for a free parameter or a fixed value for a fixed parameter. If it is a matrix of numeric values, there are
no free parameters in the output matrix. This function removes the
starting values and "*" in the matrices.
A character matrix.
Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>
as.mxMatrix
## a and b are free parameters with starting values and labels
(a1 <- matrix(c(1:4, "5*a", 6, "7*b", 8, 9), ncol=3, nrow=3))
# [,1] [,2] [,3]
# [1,] "1" "4" "7*b"
# [2,] "2" "5*a" "8"
# [3,] "3" "6" "9"
(as.symMatrix(a1))
# [,1] [,2] [,3]
# [1,] "1" "4" "b"
# [2,] "2" "a" "8"
# [3,] "3" "6" "9"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.