> I want to divide n objects in k classes and need an output with all
> (n+1)(n+2)/2 possibilities.

That's the "set of compositions". You may use the partitions package and
proceed from there (provided the brute-force method suggested by Gabor
is not viable').

______________________________________________
[email protected] 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