I created a model (using a function) saved as "x". I would like to change a label in the A matrix. Here are the labels for the A matrix:
> x$matrices$A$labels
v_1 v_2 v_3 mu
v_1 NA NA NA "b_1"
v_2 NA NA NA "b_2"
v_3 NA NA NA "b_3"
mu NA NA NA NA
I would like to change "b_3" to "b_2":
> x$matrices$A$labels[3,4] <- "b_2"
Error: Right-hand side of assignment operator has illegal value FullMatrix, SymmMatrix, FullMatrix, and FullMatrix
Why does this not work?
Best is to use omxSetparameters
To answer your question directly, I think this was not working with an early implementation of $ accessor. It is working now
(if ever one encounters something like this, a work around is to use the @ accessor which skips validation)