Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *mhunter*

Created *06/27/2010 - 14:39*

Sun, 06/27/2010 - 14:39 — mhunter [1]

I'm trying to run a model where I need to round a value in an mxMatrix to an integer. I'm doing this in an mxAlgebra. In the help files for mxAlgebra, I noticed that there is no 'round' function listed. (There are lots of other functions: min, max, abs, sum, etc.) Is there a reason for its exclusion, or was it just forgotten?

In R, if you type ?Arith to get the help page for the S4 generic mathematical operators. An mxAlgebra should probably be able to handle all of these, and already does handle most of them.

The other missing operators are %%, %/%, all logical operators, sign, ceiling, floor, trunc, cummax, cummin, cumprod, cumsum, gamma, lgamma, digamma, trigamma, round, signif, range, any, all, and the complex functions.

There also does not seem to be a way to do matrix exponentials: exp(A) not evaluating elementwise. Similarly, there seems to be issues with calculating the powers of a matrix, but that has generally been an issue with R.

Cheers,

Mike Hunter

**Links:**

[1] http://openmx.psyc.virginia.edu/users/mhunter

[2] http://openmx.psyc.virginia.edu/thread/536

[3] http://openmx.psyc.virginia.edu/thread/526

[4] http://openmx.psyc.virginia.edu/forums/openmx-developer-forums/r-functions-and-user-interface