R/is.even.R

is.even <-
function (i) 
{
    if (any(i != trunc(i))) 
        stop("All values of 'i' must be integers")
    (i%%2) == 0
}

Try the EnvStats package in your browser

Any scripts or data that you put into this service are public.

EnvStats documentation built on Sept. 11, 2024, 6:03 p.m.