shuffle {shuffleCI} | R Documentation |
This function simulates a standard riffle shuffle of a deck of 52 playing cards.
shuffle(deck)
deck |
A list of numbers. 1:52 would simulate a deck of cards in sequential order. |
The algorithm is based on the Gilbert-Shannon-Reeds method.
Returns a shuffled list (i.e. deck)
Kyle Caudle
Gilbert, E. (1955). Theory of shuffling. Technical memorandum, Bell Laboratories.
shuffle(1:52)