When factors are created with defaults, levels are formed by as.character applied to the inputs and are ordered alphabetically.
charvar <- rep(c("W", "n", "c"), times=c(17,20,14))
f <- factor(charvar)
levels(f)
# [1] "c" "n" "W"
...