really thanks for helping. i just did just like what Petr Pikal said, but it appeared some error like this:
There were 50 or more warnings (use warnings() to see the first 50): Warning messages: 1: In group[i] <- which(k1$cluster == i) : number of items to replace is not a multiple of replacement length 2: In group[i] <- which(k1$cluster == i) : number of items to replace is not a multiple of replacement length 3: In group[i] <- which(k1$cluster == i) : number of items to replace is not a multiple of replacement length ... ... ... and some solution for that, thanks.. -- View this message in context: http://r.789695.n4.nabble.com/automatically-generate-the-output-name-of-my-for-loops-tp3592160p3594096.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.