So, given an mxMatrix, testMatrix, with values:
@values
X Y G
X 1 2 3
Y 4 5 6
Then:
testMatrix[c('X'), c('X', 'G')]
yields:
@values
[,1]
X 1
G 3
The row name has been dropped and the matrix has been transposed. I'm fairly sure this is happening because of R turning the 1xN matrix in to a vector, and then OpenMx turning the vector back in to a matrix. If this is a bug, could someone point me to where the mxMatrix indexing code is, or if it's a feature, tell me what I'm doing wrong?
Oops. That's a bug, I'll check in a patch to the repository in the few minutes.
OK I checked in a fix. You can take a look at it here.
Code works fine now, thanks for the quick fix.