This question *screams* for the standard response: "What is the problem
you are trying to solve?"
I can think of two related problems off the top of my head.
1) Write a function which generates the four bridge hands from a
well-shuffled deck.
2) Throw 100 pennies into a big "shaker" with four output ports of equal
size and see how many pennies end up in each port.
Each of these problems has "hidden" constraints. So far, since the OP
hasn't weighed in, we have no idea what his constraints are.
--
Sent from my Cray XK6
"Pendeo-navem mei anguillae plena est."
______________________________________________
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.