Skip to contents

Returns TRUE if vector is an integer.

Usage

is_integer(x)

Arguments

x

An atomic vector.

Value

TRUE or FALSE

Examples

#----------------------------------------------------------------------------
# is_integer() examples
#----------------------------------------------------------------------------
library(bkdat)

w <- c(1.1, 2L)
x <- c(1, 1L, NA)
y <- 1
z <- 1L
is_integer(w)
#> [1] FALSE
is_integer(x)
#> [1] TRUE
is_integer(y)
#> [1] TRUE
is_integer(z)
#> [1] TRUE