Really you just want a random permutation of r: > rperm <- sample(r)
Then you can obtain a random partition of r into cells of any desired size simply by taking appropriately-sized consecutive blocks of rperm. Murray At 22:42 17/11/2003 -0500, Rajarshi Guha wrote: >Sorry for not providing all the details. > >The 3 sets can be of any size (which will be specified by the user of >the function) and cover all of r (ie, set1 + set2 + set3 == r) > >Thanks to everybody for all the solutions. > >------------------------------------------------------------------- >Rajarshi Guha <[EMAIL PROTECTED]> <http://jijo.cjb.net> >GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE >------------------------------------------------------------------- >"I'd love to go out with you, but there are important world issues that >need worrying about." > >______________________________________________ >[EMAIL PROTECTED] mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help > Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: [EMAIL PROTECTED] Fax 7 838 4155 Phone +64 7 838 4773 wk +64 7 849 6486 home Mobile 021 1395 862 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help