Learn R Programming

contrastable (version 1.0.2)

is.unordered: Check for unordered factor

Description

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

Usage

is.unordered(x)

Value

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

Arguments

x

a vector of data

Examples

Run this code
is.unordered(gl(5,1)) # True
is.unordered(gl(5,1,ordered = TRUE)) # False

Run the code above in your browser using DataLab