Skip to contents

Helper to check if a factor is exclusively unordered. is.factor(x) is TRUE when x is unordered OR ordered.

Usage

is.unordered(x)

Arguments

x

a vector of data

Value

TRUE if x is an unordered factor, FALSE if x is not a factor or is an ordered factor

Examples

is.unordered(gl(5,1)) # True
#> [1] TRUE
is.unordered(gl(5,1,ordered = TRUE)) # False
#> [1] FALSE