Description Usage Arguments Value
View source: R/random_permutation.R
Generates a function that provides lazy number generation from a random permutation of integers 1 to n without repetition. The numbers are generated using the Fisher-Yates algorithm and run length encoding (RLE) is used to keep memory use for the storage of used/available numbers minimal.
1 |
n |
Upper limit for random numbers (inclusive) |
A function f(m)
that returns m
random numbers from the random
permutation of integers 1 to n without repetition,. If all available
numbers 1 to n have been returned but more are requested, the function throws
an error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.