is_prime: Find prime numbers

View source: R/is_prime.R

is_primeR Documentation

Find prime numbers

Description

This functions checks whether a number is, or numbers in a vector are prime numbers.

Usage

is_prime(x)

Arguments

x

An integer, or a vector of integers.

Value

TRUE for each prime number in x, FALSE otherwise.

Examples

is_prime(89)
is_prime(15)
is_prime(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))


sjstats documentation built on May 29, 2024, 12:09 p.m.