Given a number of boxes, randomly distribute n balls into these boxes.
Arguments
- n
A natural number. The number of balls to put into the boxes.
- boxes
A natural number. The number of boxes.
- weights
A non-negative numeric vector. The relative probabilities of putting a ball in each box. Default is each box is equally likely.
- capacities
A vector of natural numbers. The capacity of each box. Default is each box has infinite capacity.