Closed boxuancui closed 8 years ago
To re-produce:
data <- data.frame("a" = as.factor(round(rnorm(500, 10, 5))), "b" = rexp(500, 1:500)) table(data$a) CollapseCategory(data, "a", 0.2, update = TRUE) ## data is not updated table(data$a)
It is very hard to modify the input data directly, if it is not data.table. Here are a few modifications of this function:
data.table
update = TRUE
update = FALSE
To re-produce: