Ah, I finally figured it out: I had asked > In both of those cases, why is the [] needed?
It's because when on the left hand side of an assignment, the bracket operator attempts to preserve the class and dimension of the object it's subsetting. (Or at least, that's true when the object is a data frame.) -- View this message in context: http://n4.nabble.com/Sharing-levels-across-multiple-factor-vectors-tp1747714p1749502.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.