## MxAlgebra wishlist

 Project: OpenMx Component: Code Category: feature request Priority: normal Assigned: Unassigned Status: active
Description

The following algebras would be nice to have. They are currently scheduled for completion after the 1.0 release:

ceiling, floor, trunk, round
dim
rowMeans, colMeans
cov2cor

### #1

Scripts often involve computing A %*% t(A) or A %*% t(B)
It would be a handy help to have an mx function return multiply by transpose
I realise that this is not (or at least I can't see) a standard, but it would make scripting more compact and quicker to type and maintain, just as %&% and cov2cor() do.

Perhaps:
tx(A) = A %*% t(A)
tx(A,B) = A %*% t(B)

### #2

Er, we still don't have cov2cor() in the OpenMx backend?

Error: Unknown matrix operator or function 'cov2cor' in mxAlgebra(t(vechs(cov2cor(ACE.expCovMZ))), name = "MZexpcor")

### #3

Oops. I checked in a change to the svn trunk that implements cov2cor in the backend.

### #4

Update for the addition of vec2diag()

Can we have diag() and chol() please?

The functionality of diag() is supported by vec2diag()

Unlike diag, this function always tries to populate a square matrix from a diagonal vector. i.e., vec2diag(3) etc won't act as you expect from using diag(3)

Would still be good to support chol() in algebras

### #5

We have strayed away from diag() because R's behavior is so ambiguous. diag(3), diag(1:3), and diag(matrix(1:9, 3, 3)) are all distinct entities to OpenMx. They are mxMatrix('Diag', 3, 3, FALSE, 1), vec2diag(c(1, 2, 3)), and diag2vec(foo), respectively in OpenMx.

We currently support chol(). Mike Neale added it some time ago, I believe.

### #6

ahh, chol() is in 1.3.2 (tried in a 1.3.1 install)

added chol and cov2cor to the mxAlgebra.Rd