Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get.primes

Get primes for quasi random number generation


Description

Provides a vector of a specified number of smallest primes from the internal table of the package.

Usage

get.primes(n)

Arguments

n

The required number of primes. Should be at most 100 000.

Details

The package contains an internal table of the smallest 100 000 primes, which may be used in torus algorithm.

Value

Vector of min(n, 100000) smallest primes.

See Also

Examples

p <- get.primes(20)
torus(5,dim=10,prime=p[11:20])

randtoolbox

Toolbox for Pseudo and Quasi Random Number Generation and Random Generator Tests

v1.30.1
BSD_3_clause + file LICENSE
Authors
R port by Yohan Chalabi, Christophe Dutang, Petr Savicky and Diethelm Wuertz with some underlying C codes of (i) the SFMT algorithm from M. Matsumoto and M. Saito, (ii) the Knuth-TAOCP RNG from D. Knuth.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.