R/alphabetize.factor.R

Defines functions alphabetize.factor

# alphabetize.factor: alphabetizes a factor
# this is very quick and dirty with no checking.
# Date: March 31, 2026
alphabetize.factor <- function(x) {
  return(factor(sort(c(as.character(x)))))
  }

Try the dunn.test package in your browser

Any scripts or data that you put into this service are public.

dunn.test documentation built on June 5, 2026, 5:06 p.m.