Learn R Programming

randtoolbox (version 1.11)

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.

Value

  • Vetor of min(n, 100000) smallest primes.

concept

prime number

Details

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

See Also

torus

Examples

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

Run the code above in your browser using DataLab