mxMatrix$values accessor not checking legality of assignment

tbates's picture
Project:OpenMx
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

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 @

Comments

AdminRobK's picture

#1

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.

AdminRobK's picture

#2

Status:active» closed

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