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

Bug: Factor ordering of 3rd variable is lost in tabyl() #250

Closed
sfirke opened this issue Nov 8, 2018 · 1 comment · Fixed by #287
Closed

Bug: Factor ordering of 3rd variable is lost in tabyl() #250

sfirke opened this issue Nov 8, 2018 · 1 comment · Fixed by #287
Labels
Milestone

Comments

@sfirke
Copy link
Owner

sfirke commented Nov 8, 2018

z <- mtcars
z$cyl <- factor(z$cyl, levels = c(4, 8, 6))
z %>% tabyl(cyl) # good, order is 4, 8, 6
z %>% tabyl(am, gear, cyl) # bad, order is alphabetical 4 6, 8

Should be in order 4, 8, 6 as specified.

@sfirke sfirke added the bug label Mar 15, 2019
@sfirke sfirke added this to the v1.2 milestone Mar 15, 2019
@sfirke
Copy link
Owner Author

sfirke commented Apr 17, 2019

Working on this on this branch: https://github.com/sfirke/janitor/tree/sort_3_way_tabyl_factor_levels But need to fix the problem I created in #274 first!

sfirke added a commit that referenced this issue Apr 18, 2019
closes #250, three-way tabyls where 3rd variable is a factor are now sorted by factor level
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant