f1 <- c("a", "b", "c")
f2 <- c("x", "e", "t")
f1 <-factor(f1)
f1
#[1] a b c
#Levels: a b c
str(f1)
#Factor w/ 3 levels "a","b","c": 1 2 3
f2 <-factor(f2)
f2
#[1] x e t
#Levels: e t x
str(f2)
#Factor w/ 3 levels "e","t","x": 3 1 2
As mentioned above, why in f2 is "e" being taken as 3? Shouldn't it be 1, when it considered in alphabetical order?