I am trying the following (see code below) and getting this error:
Error: The name 'mPA', 'mPA', 'mPA', 'mPA', 'mPA', 'mPA', 'mPA', 'mPA', 'mPA', and 'mPA' is illegal because it contains multiple '.' characters in mxMatrix("Full", nrow = 1, ncol = numManifest, values = 0.05, free = TRUE, dimnames = list(NULL, manifests), name = c(rep("mPA", embedD), rep("mPA", embedD)))
What am I missing? As far as I can tell, the names do not have any punctuation symbols in them.
~ Angela
numManifest <- 10
manifests <- c(paste("pos",0:4,sep=""),paste("str",0:4,sep=""))
embedD <- 5
mxMatrix("Full", nrow=1,ncol=numManifest,
values=.05,
free=TRUE,
dimnames = list(NULL,manifests),
name=c(rep("mPA",embedD),rep("mPA",embedD))
)
correction, the name= statement should read
name=c(rep("mPA",embedD),rep("mPS",embedD))
full corrected statement
mxMatrix("Full", nrow=1,ncol=numManifest,
values=.05,
free=TRUE,
dimnames = list(NULL,manifests),
name=c(rep("mPA",embedD),rep("mPS",embedD))
)
Oops. I think you meant to type "labels=" instead of "name=". But it looks like we have a bug where mxMatrix() is doing the wrong thing when the length of the 'name' argument is greater than 1. I'll fix that.
Thanks. I think we were typing at the same time...
Ah, never mind. I was confusing 'labels' and 'name' in mxMatrix(). Perhaps an error message that indicated the matrix can only be assigned one name would be informative.