Description Usage Arguments Details Examples
Checks whether n is a prime number.
1 | is.prime(n)
|
n |
A non-negative integer |
is.prime expects a positive integer and returns an error for n ≤ 0. Works well until 10¹¹. Algorithm is based on http://librestats.com/2011/08/20/prime-testing-function-in-r/
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.