what if I don't need to store the combination results, I just want to get the combination result for a given row. e.g. for the 5 elements divided into 3 groups , and if I give another parameter which is the row number of the results, in petr's example, say if I set row number to 1, then I get 1,2,3,1,1.
So I need a systematic way of generating the combination, but I don't need all the combinations in one go. Many thanks!!!! yan -- View this message in context: http://r.789695.n4.nabble.com/function-for-grouping-tp4324436p4330877.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.