Overview

random provides GNU R with easy access to the true random numbers provided by random.org created by Mads Haahr. random is portable and does not depend on any hardware- or operating system-specific features to supply true (i.e. physical) randomness.

The package provides three simple funcions:

  • randomNumbers supplies random numbers, potentially with replications, over an interval--like rolling a die (with more than six sides) multiple times;
  • randomSequence supplies a reshuffled sequence given a lower and upper bound for the sequence;
  • randomStrings supplies strings of fixed length with optional digits, lower- and upper-case letters.
Moreover, a utility function randomQuota queries the server about the remaining bits for the given requester IP address. The function quotaCheck simply checks whether this value is positive.

Background

The pdf document random-intro provides a more detailed overview, including tests of random.org using the dieharder suite.

The pdf document random-essay is a copy of essay by Mads Haahr at the random.org website.

Both documents are included in the R package and accessible via the vignette() function once the package is loaded.

Download

From this machine, you can get the random most recent tar archive, or simply peruse the entire directory.

Alternatively, you can also get random from a Comprehensive R Archive Network (CRAN) node in the src/contrib directory.

Installation

The easiest way is probably to simply say install.package("random") from inside GNU R. Alternative, R CMD INSTALL random_*.tar.gz will install from command prompt.

Last modified: Wed Mar 5 21:22:25 CST 2014