Prime numbers

First, the package has to be included:

library(testgenthat)

Then you can ask the isPrime function whether a given number is prime, or not. Such as:

isPrime(10)

The above should return F because 10 is divisible by 2 and 5. On the other hand 211 should be a prime number:

isPrime(211)


reactorlabs/testgenthat documentation built on May 27, 2019, 4 a.m.