Skip to content
Prev 199866 / 398506 Next

Re moving levels of a factor

Henrik Wahren wrote:
Simply call factor again on the reduced set

a = factor(c("a","b","b","b"))
a[-1]
factor(a[-1])

If a is in a data frame, replace a by by df$a.

Dieter