View source: R/build_run_modify.R
umxMatrix | R Documentation |
umxMatrix is a wrapper for mxMatrix which labels cells buy default, and has the name parameter first in order.
umxMatrix(
name = NA,
type = "Full",
nrow = NA,
ncol = NA,
free = FALSE,
values = NA,
labels = TRUE,
lbound = NA,
ubound = NA,
byrow = getOption("mxByrow"),
baseName = NA,
dimnames = NA,
condenseSlots = getOption("mxCondenseMatrixSlots"),
...,
joinKey = as.character(NA),
joinModel = as.character(NA),
jiggle = NA
)
name |
The name of the matrix (Default = NA). Note the different order compared to mxMatrix! |
type |
The type of the matrix (Default = "Full") |
nrow |
Number of rows in the matrix: Must be set |
ncol |
Number of columns in the matrix: Must be set |
free |
Whether cells are free (Default FALSE) |
values |
The values of the matrix (Default NA) |
labels |
Either whether to label the matrix (default TRUE), OR a vector of labels to apply. |
lbound |
Lower bounds on cells (Defaults to NA) |
ubound |
Upper bounds on cells (Defaults to NA) |
byrow |
Whether to fill the matrix down columns or across rows first (Default = getOption('mxByrow') |
baseName |
Set to override the default (which is to use the matrix name as the prefix). |
dimnames |
NA |
condenseSlots |
Whether to save memory by NULLing out unused matrix elements, like labels, ubound etc. Default = getOption('mxCondenseMatrixSlots') |
... |
Additional parameters (!! not currently supported by umxMatrix) |
joinKey |
See mxMatrix documentation: Defaults to as.character(NA) |
joinModel |
See mxMatrix documentation: Defaults to as.character(NA) |
jiggle |
= NA passed to xmuLabel to jiggle start values (default does nothing) |
OpenMx::mxMatrix()
xmu_simplex_corner()
, OpenMx::mxMatrix()
, xmuLabel()
, umxRAM()
Other Core Model Building Functions:
umx
,
umxModify()
,
umxPath()
,
umxRAM()
,
umxSuperModel()
## Not run:
# ==================================================================================
# = 1. Showing how name is first parameter, and how cells are labelled by default. =
# ==================================================================================
umxMatrix("test", "Full", 2, 2)$labels
# [,1] [,2]
# [1,] "test_r1c1" "test_r1c2"
# [2,] "test_r2c1" "test_r2c2"
# ===========================================================
# = 2. Over-ride default (matrix name) as prefix for labels =
# ===========================================================
umxMatrix("test", "Full", 2, 2, baseName = "bob")$labels # bob_r1c1
# ==========================================
# = 3. User-provided labels are left as-is =
# ==========================================
umxMatrix("foo", "Lower", nrow=2, ncol=2, labels= c(NA, "beta1", NA))
# [,1] [,2]
# [1,] NA NA
# [2,] "beta1" NA
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.