Hello,

?assign

assign(paste("plotroc_GBM_Trn_", i, sep=""), matrix(rnorm(100),10,10))

HTH,
Pascal


Le 30/01/2013 17:04, Kumar Mainali a écrit :
I have a situation when I need to save matrix with file names that are
programmatically created.

for (i in levels(mergeTrn$Continent)) {
         matrix here....

# I want to save this matrix with a file name that carries "i" from for
loop. The following does not work.
paste("plotroc_GBM_Trn_", i, sep="") <- matrix

}

Thanks,
Kumar


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to