Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollapseCategory does not update when input data is not data.table #30

Closed
boxuancui opened this issue Nov 18, 2016 · 1 comment
Closed

CollapseCategory does not update when input data is not data.table #30

boxuancui opened this issue Nov 18, 2016 · 1 comment
Assignees
Milestone

Comments

@boxuancui
Copy link
Owner

@boxuancui boxuancui commented Nov 18, 2016

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)
@boxuancui boxuancui added the type: bug label Nov 18, 2016
@boxuancui boxuancui added this to the 0.3.0 milestone Nov 18, 2016
@boxuancui boxuancui self-assigned this Nov 18, 2016
@boxuancui
Copy link
Owner Author

@boxuancui boxuancui commented Nov 18, 2016

It is very hard to modify the input data directly, if it is not data.table. Here are a few modifications of this function:

  1. update = TRUE will only work when input data is data.table.
  2. You may still view the frequency distributions with any data format, as long as update = FALSE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.