hadley wickham wrote: > a <- data.frame(b = rep(1:5, each=2), c=factor(rep("a",10), levels=c("a","b"))) > levels(subset(a, b=1, drop=T)$c) > # [1] "a" "b" > > Is this a bug? > Also, I think you meant: levels(subset(a, b==1, drop=T)$c) (Note the double-equals for logical equality) --sundar