is.prim {schoolmath}R Documentation

check wether a vector contains prime-numbers

Description

This function checks, wether a vector contains prime-numbers. It returns TRUE or FALSE

Usage

is.prim(y)

Arguments

y a number or vector to be checked

Author(s)

Joerg Schlarmann

See Also

primes

Examples


is.prim(8)  # this will return FALSE
is.prim(11) # this will return TRUE

x <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
is.prim(x)


[Package schoolmath version 0.2 Index]