Dirk Eddelbuettel random: non-determinisitic random number for GNU R
 

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;
  • randomBytes supplued raw bits in binary, octal, decimal or hexadecimal format.
Moreover, a utility function randomBufferStatus queries the server about the percentage to which the supply is `filled'. The function sufficientBits simply checks whether this percentage value is below or above the recommended cut-off threshold of 20%.

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 Aug 16 20:01:29 CDT 2006