umx (version 1.9.1)

umx_get_bracket_addresses: get mat[r,c] style cell address from an mxMatrix

Description

Sometimes you want these :-) This also allows you to change the matrix name: useful for using mxMatrix addresses in an mxAlgebra.

Usage

umx_get_bracket_addresses(mat, free = NA, newName = NA)

Arguments

mat

an mxMatrix to get address labels from

free

how to filter on free (default = NA: take all)

newName

= NA

Value

- a list of bracket style labels

References

- http://tbates.github.io, https://github.com/tbates/umx

See Also

Other Misc: umxEval, umx_APA_model_CI, umx_add_variances, umx_apply, umx_default_option, umx_object_as_str, umx_string_to_algebra, umx

Examples

Run this code
# NOT RUN {
require(umx)
data(demoOneFactor)
latents  = c("G")
manifests = names(demoOneFactor)
m1 <- mxModel("One Factor", type = "RAM", 
	manifestVars = manifests, latentVars = latents, 
	mxPath(from = latents, to = manifests),
	mxPath(from = manifests, arrows = 2),
	mxPath(from = latents, arrows = 2, free = FALSE, values = 1.0),
	mxData(cov(demoOneFactor), type = "cov", numObs = 500)
)
umx_get_bracket_addresses(m1$matrices$A, free= TRUE)
# }

Run the code above in your browser using DataCamp Workspace