Re: [R] Collapsing Categorical Variables

2004-02-26 Thread Sundar Dorai-Raj
Ko-Kang Kevin Wang wrote: Hi, Suppose I have a categorical variable called STREET, and I have 30 levels for it (i.e. 30 different streets). I want to find all those streets with only 15 observations or below then collapse them into a level called OTHER. Is there a quick way, other than using a

[R] Collapsing Categorical Variables

2004-02-26 Thread Ko-Kang Kevin Wang
Hi, Suppose I have a categorical variable called STREET, and I have 30 levels for it (i.e. 30 different streets). I want to find all those streets with only 15 observations or below then collapse them into a level called OTHER. Is there a quick way, other than using a for() loop, to do it?