Description Usage Arguments Value Examples
Runs several visual and statistical checks to determine if a given vector is truly random.
1 | randomness(x, n_max = 5000)
|
x |
A numeric vector. |
n_max |
A number indicating the maximum lines in x for which a |
A number indicating statistical randomness
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Hopefully random distributions
x <- runif(100)
randomness(x)
x <- rnorm(100)
randomness(x)
# True random numbers
if (require(random)) {
x <- randomNumbers()
randomness(x)
}
# Non-random sequences
x <- sin((1:100)/pi)
randomness(x)
x <- 1:100
randomness(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.