Skip to content
Prev 44942 / 398530 Next

Collapsing Categorical Variables

Kevin,

something like ....

table(STREET)
STREET <- as.character(STREET)
STREET[as.numeric(factor(STREET)) %in% which(table(STREET) < 15)] <- "Other"
STREET <- factor(STREET)
table(STREET)


Andrew
On Thursday 26 February 2004 15:25, Ko-Kang Kevin Wang wrote: