[R] combinatorics

From: Robin Hankin <r.hankin_at_noc.soton.ac.uk>
Date: Fri 13 Oct 2006 - 14:18:56 GMT


How do I generate all ways of ordering sets of indistinguishable items?

suppose I have two A's, two B's and a C.

Then I want

. . .snip...

. . .snip...

CBBAA [there are 5!/(2!*2!) = 30 arrangements. Note AABBC != BBAAC]

How do I do this?

Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sat Oct 14 00:24:37 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 15 Oct 2006 - 12:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.