The `random`

package provides several functions that
access the true random number service at http://random.org.

`randomNumber`

retrieves random integers with duplicates,
`randomSequence`

retrieves random sequences without
duplicates and `randomStrings`

retrieves strings.

`randomQuota`

returns the number of available retrievals, and
`quotaCheck`

does a simple binary comparison of remaining numbers
under the quota.

1 2 3 4 5 | ```
randomNumbers(n=100, min=1, max=100, col=5, base=10, check=TRUE)
randomSequence(min=1, max=20, col=1, check=TRUE)
randomStrings(n=10, len=5, digits=TRUE, upperalpha=TRUE, loweralpha=TRUE, unique=TRUE, check=TRUE)
randomQuota()
quotaCheck()
``` |

`n` |
The number of random integers, or bytes, to be retrieved. |

`min` |
The minimum value for the returned numbers. |

`max` |
The maximum value for the returned numbers. |

`col` |
The number of columns for the return object. |

`base` |
The base for the random numbers: one of 2, 8, 10 or 16. |

`len` |
The length of strings returned by randomStrings(). |

`digits` |
Select whether digits are part of random strings. |

`upperalpha` |
Select whether uppercase characters part of random strings. |

`loweralpha` |
Select whether lowercase characters part of random strings. |

`unique` |
Select whether random strings must be unique. |

`check` |
Select whether quota at server should be checked first. |

The http://random.org services uses atmospheric noise sample
via a radio tuned to an unused broadcast frequency together with a
skew correction originally due to John von Neumann. Please see the
included `vignette`

for more details.

Each function returns a `matrix`

.
For `randomNumbers`

, it contains `col`

columns of
a total of `n`

integers between `min`

and
`max`

, possibly containing duplicates. For
`randomSequence`

, it contains the shuffled sequence
denoted by `min`

and `max`

. For
`randomStrings`

, `n`

strings of length `len`

are returned.

`randomQuota`

returns the number of bits remaining for retrieval
at the given day under the currently used IP address.
`quotaCheck`

is a simple convenience wrapper which tests
whether the return from `randomBufferStatus()`

is a positive number.

Dirk Eddelbuettel edd@debian.org for the
**R** interface; Mads Haahr for `random.org`

.

The `random.org`

website at http://www.random.org.
Also see the included vignette for further references.

1 2 3 4 5 6 | ```
## Cannot run these as we may not have an internet connection
## Not run:
rn <- randomNumbers(100, 1, 100, 5)
rs <- randomSequence(1, 20)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.