result of mxRun cannot be run as a model

Currently this doesn't work:

fit= mxRun(model); mxRun(fit)
The result is:
  Running twinACE
  Running twinACE
  Error: The expected means matrix associated with the FIML objective function in model    
     'twinACE' does not contain dimnames.

I guess the dimnames are being stripped off in the result making the resulting fit not a runnable model.

Add omxCheck...() statements to demos

Hi Tim,

Can you add omxCheckCloseEnough() statements to OneFactorMatrixDemo.R and TwinAnalysis_Multivariate_Matrix_Raw.R? There may be a bug in the way the optimizer handles the second demo, but we can't be certain until we know what the correct answer is supposed to be. Also I went ahead and made some R style changes to TwinAnalysis_Multivariate_Matrix_Raw.R. Until we get an OpenMx wiki page on R style guidelines, use the Google R style guide: http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html, particularly items (7) and (8).

mxRun printing empty arrays during run?

starting in 821 (or perhaps 820), running a model causes a series of empty arrays to be printed early on in the execution...

> fit = mxRun(model)
Running ACE
[[1]]
[1] NA

[[2]]
[1] NA

[[3]]
[1] NA

[[4]]
[1] NA

[[5]]
[1] NA

[[6]]
[1] NA

[[1]]
[1] NA

[[2]]
[1] NA

[[3]]
[1] NA

[[4]]
[1] NA

[[5]]
[1] NA

[[6]]
[1] NA

Add pages from Mx manual describing matrix operators & functions with examples

Per Mx manual, 6th edition:
http://ibgwww.colorado.edu/workshop2008/cdrom/Software/Mx/doc/mxmanual.pdf

Table 4.1 - matrix types and their free elements
Table 4.3 - Examples of use of the Matrices command to specify the dimensions of different matrix types
Table 4.5 - matrix functions

Some of table 4.5 has been implemented, but not all. What is really needed is the text descriptions of all the matrix operators and functions, so that we have online & pdf documentation of what the matrix operators and functions actually do.

?mxAlgebra example code doesn't run

Documentation helper gives an error
Running AlgebraExample
Error in mxRun(modelD) :
MxAlgebraObjective's objective algebra does not evaluate to a 1x1 matrix.

I'd suggest this:

A <- mxMatrix("Full", nrow = 3, ncol = 3, values=2, name = "A")

# Simple example: algebra B simply evaluates to the matrix A
B <- mxAlgebra(A, name = "B")

# Compute A + B
C <- mxAlgebra(A + B, name = "C")

# Compute sin(C)
D <- mxAlgebra(sin(C), name = "D")

# Make a model and evaluate the mxAlgebra object 'D'
A <- mxMatrix("Full", nrow = 3, ncol = 3, values=2, name = "A")