5
Suppose I have the following database:
df <- data.frame(categorias=c("A","B","C","D","E"),
valores=seq(1:5))
When I do a subset of that data frame the categories I removed continue.
subdf <- subset(df, valores <= 3)
levels(subdf$categorias)
[1] "A" "B" "C" "D" "E"