primes {conf.design} | R Documentation |
Prime numbers
Description
Generate a table of prime numbers.
Usage
primes(n)
Arguments
n |
A positive integer value, or vector or such values. |
Details
Uses an elementary sieve method.
Value
A vector of all prime numbers less than the max(n)
.
NB: 1 is not a prime number!
Side Effects
None
See Also
Examples
primes(1:50)
### [1] 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47
[Package conf.design version 2.0.0 Index]