Revision of mxEval-help from Sat, 09/26/2009 - 08:49

If you have questions not answers, then add those here: That's how a wiki works.

The purpose of mxEval() is to allow you to evaluate arbitrary R statements which may include data from inside a model.

mxEval() takes two essential parameters: the statement you want to evaluate, and a model in which to look for objects.

Optionally, you can include "compute=TRUE" to evaluate an OpenMx statement using R and "show=TRUE" to show where how mxEval translated your statement into full references to R and model objects

The simplest and most common use of mxEval is to extract a matrix from a model:

mxEval(M, model)
--> matrix M from model

note: If M is not found in the model, but an object called M exists in your R environment, mxEval will return that object. To avoid misleading results, use full object names, for instance, if the name of model is "model", this statement will only return M if model.M exists