I am creating lists of vectors withing a loop. I also would like to change the dim attribute to the vectors in order to make them matrices.
I have tried the following, but it doesn't work... > sim <- c('simMeans','simVars','simWeights') > indexTable <- table(modelIndex) > for (i in sim) { + assign(tmp <- paste(i,'By',sep=''),split(get(i), modelIndex)) + lapply(seq(along=indexTable),function(j) attr(get(tmp)[[j]],'dim') <<- c(indexTable[j],K)) + } Error in FUN(X[[1]], ...) : couldn't find function "get<-" In addition: Warning message: argument lengths differ in: split(x, f) Any suggestions will be appreciated. Thanks ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help