is.unordered function

Check for unordered factor

Check for unordered factor

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

is.unordered(x)

Arguments

  • x: a vector of data

Returns

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 is.unordered(gl(5,1,ordered = TRUE)) # False
  • Maintainer: Thomas Sostarics
  • License: MIT + file LICENSE
  • Last published: 2024-10-01