Error: The name....is illegal because it contains multiple '.' characters...

Posted on
No user picture. adstaple Joined: 01/06/2010

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))
)

Replied on Thu, 08/12/2010 - 10:05
No user picture. adstaple Joined: Jan 06, 2010

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))
)

Replied on Thu, 08/12/2010 - 10:11
No user picture. adstaple Joined: Jan 06, 2010

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.