It converts a vector into MxMatrixclass
via mxMatrix
.
1 2 
x 
A character or numeric vector 
type 
Matrix type similar to those listed in

ncol 
Number of columns. It is necessary when

nrow 
Number of rows. It is necessary when

as.mxMatrix 
Logical. If it is 
byrow 
Logical. If 
... 
Further arguments to be passed to

If there are nonnumeric values in x
, they are treated
as the labels of the free parameters. If an "*" 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 is
no free parameters in the output matrix. nrow
and ncol
will be calculated from the length of x
unless
type="Full"
is specified.
A MxMatrixclass
object with the same
dimensions as x
Mike W.L. Cheung <mikewlcheung@nus.edu.sg>
mxMatrix
,
create.mxMatrix
, create.Fmatrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  ## a and b are free parameters with starting values and labels
(a1 < c(1:4, "5*a", 6, "7*b", 8, 9))
(mat1 < create.mxMatrix(a1, ncol=3, nrow=3, name="mat1"))
## Arrange the elements by row
(mat2 < create.mxMatrix(a1, ncol=3, nrow=3, as.mxMatrix=FALSE, byrow=TRUE))
(a3 < c(1:3, "4*f4", "5*f5", "6*f6"))
(mat3 < create.mxMatrix(a3, type="Symm", name="mat3"))
## Create character matrix
(mat4 < create.mxMatrix(a3, type="Symm", as.mxMatrix=FALSE))
## Arrange the elements by row
(mat5 < create.mxMatrix(a3, type="Symm", as.mxMatrix=FALSE, byrow=TRUE))
(mat6 < create.mxMatrix(a3, type="Diag", lbound=6:1, name="mat6"))

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.