Consider the following dataframe
set.seed(123)
x <- data.frame(let = sample(letters[1:6], 100, replace = T),
num = sample(1:10, 100, replace = T))
y <- subset(x, let != 'a')
So, how can I drop unused levels i.e. those levels that are not used in the data frame?