MxMatrix object

Posted on
Picture of user. carey Joined: 10/19/2009
(1) documentation for "mxMatrix" says "This functions [sic] creates a new MxMatrix object."
(2) documentation for "MxMatrix" says that it "is an S4 class."

consider:
> unit5 <- mxMatrix(name='unit5', type='Lower', nrow=2, free=FALSE, values=1)
> class(unit5)
[1] "LowerMatrix"
attr(,"package")
[1] "OpenMx"

problem comes in when someone is looking for MxMatrix objects in, say, the workspace:
> objs <- ls(envir=.GlobalEnv)
> objs[which(sapply(objs, function(x) class(get(x))) == "MxMatrix")]
character(0)

greg

Replied on Tue, 04/12/2011 - 17:17
Picture of user. mspiegel Joined: 07/31/2009

The different MxMatrix subclasses all extend from a common base class.

> extends("LowerMatrix")
[1] "LowerMatrix" "MxMatrix"