Description Usage Arguments Details Value Author(s) References See Also Examples
Function to shuffle vectors according to the Fisher-Yates procedure
1 | fyshuffle(x)
|
x |
Vector containing the sequence which needs to be shuffled. This vector can be of any type and it is allowed to have one element. |
Other than the sample
function fyshuffle
treats a single value as a vector with one element and will therefore return this element as the shuffled version of the original vector (which are similar).
A randomized version of the input vector.
Reinder Radersma
Durstenfeld (1964) Communications of the ACM 7(7):420
1 2 3 4 5 |
[1] 6 9 3 1 5 10 2 4 8 7
[1] "a" "b" "f" "e" "d" "c"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.