is.prime | R Documentation |
Check if an integer is a prime number
is.prime(num)
num |
(Numeric) An integer. |
TRUE
if num
is prime.
geotheory (https://stackoverflow.com/users/1156245/geotheory)
Desi Quintans (<http://www.desiquintans.com)
https://stackoverflow.com/a/19767707/5578429
is.prime(2)
#> [1] TRUE
is.prime(3)
#> [1] TRUE
is.prime(4)
#> [1] FALSE
is.prime(5)
#> [1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.