Skip to contents

Returns TRUE if vector is 1-dimensional with values of type integer, double, character, logical, or complex.

Usage

is_atomic(x)

Arguments

x

An object.

Value

TRUE or FALSE

Examples

#----------------------------------------------------------------------------
# is_atomic() examples
#----------------------------------------------------------------------------
library(bkdat)

is_atomic(1)
#> [1] TRUE
is_atomic(FALSE)
#> [1] TRUE
is_atomic(matrix(1))
#> [1] FALSE
is_atomic(c("a", "b"))
#> [1] TRUE
is_atomic(data.frame(1))
#> [1] FALSE