If we have an atomic variable (which a factor is), it will have a length
value
X <- factor(letters)
length(X)
## [1] 26
It will also have levels
levels(x)
When X
is a factor, it is
the following classes
is(X)
[1] "factor" "integer" "oldClass" "numeric" "vector"