You are here

mxMatrix$values accessor not checking legality of assignment

hi,
given a matrix:

library(OpenMx)
symmMatrix <- mxMatrix("Symm", nrow = 3, ncol = 3)

the $ setter is allowing this

symmMatrix$values[1,2] <- 2

without internally also doing this

symmMatrix$values[2,1] <- 2

i.e., just like the old direct access @

Reporter: 
Created: 
Fri, 07/25/2014 - 12:21
Updated: 
Fri, 08/12/2016 - 11:24

Comments

I'm not sure this is within our control. The only method we define in

symmMatrix$values[1,2] <- 2

is that for the $ accessor, which simply reads and returns the value of slot 'values', which is a numeric matrix. The actual assignment method involved is for an R matrix, which is defined in base R, and not something we control.

This behavior is not by design, but won't fix. Closed.