[R] Sharing levels across multiple factor vectors

Jeff Brown dopethatwantscash at yahoo.com
Fri Apr 2 20:56:55 CEST 2010


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.



More information about the R-help mailing list