Determines if the level of a is greater than that of b

factor_is_greater(a, b)

Arguments

a, b

Two same-length, same-leveled vectors of type factor

Value

a single boolean vector of type logical

Examples

first <- c("J", "O", "S", "H") last <- c("C", "O", "O", "K") first <- factor(first, LETTERS) last <- factor(last, LETTERS) factor_is_greater(first, last)
#> [1] TRUE FALSE TRUE FALSE