Appending mxAlgebra expressions
Posted on

Forums
Hello,
I am trying to generate mxAlgebra expressions from a size variable. I have a variable amount of mx submodels and am trying to add the objectives from these together for a full model objective. I have tried things like
mxAlgebra(sum(get(paste("submodel",1:x,".objective",sep=""))),
name="TotObj")
and other various methods. I also tried the method described on
http://openmx.psyc.virginia.edu/thread/537
but don't think this will help in my particular situation.
Any suggestions?
Best,
-LLL
The trick is to construct the
The trick is to construct the expression outside of the mxAlgebra() call and then feed the expression into mxAlgebra(). The mxAlgebra() will only recognize matrix operators or functions, so it barfs on the get() and the paste(). Try this:
Log in or register to post comments
In reply to The trick is to construct the by mspiegel
Thanks a bunch. This did the
Thanks a bunch. This did the trick.
Log in or register to post comments