Skip to content
Prev 141799 / 398498 Next

Is this an artifact of using "which"?

I didn't mean to be a troll, and I can certainly see the virtue in 
preserving levels for the cases as you described, but it was something 
that caught me out me when I first learned R.  Having the levels of a 
factor as "the values that my categorical data takes", rather than "the 
_possible_ values that my categorical data takes" was more natural to me. 
The important thing is that it is possible to include or drop the unused 
levels easily as required.

Btw, has the behaviour of the drop argument to '[' changed recently?  I 
seem to remember that drop=TRUE didn't remove unused factor levels in 
older versions, though my memory may be mistaken.

Regards,
Richie.

Mathematical Sciences Unit
HSL


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}