powered by
Test whether a vector of numbers is prime or composite.
is_prime(x)
A logical vector.
an integer vector containing elements to be tested for primality.
Os Keyes and Paul Egeler, MS
is_prime(4:7) ## [1] FALSE TRUE FALSE TRUE is_prime(1299827) ## [1] TRUE
Run the code above in your browser using DataLab