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

Create tabyl vignette that shows the order of adornments #132

Closed
sfirke opened this issue Aug 23, 2017 · 1 comment
Closed

Create tabyl vignette that shows the order of adornments #132

sfirke opened this issue Aug 23, 2017 · 1 comment

Comments

@sfirke
Copy link
Owner

sfirke commented Aug 23, 2017

Not "wrong" but not the typical desired result:

> mtcars %>% tabyl(cyl, am) %>% adorn_percentages() %>% adorn_totals()
    cyl         0         1
1     4 0.2727273 0.7272727
2     6 0.5714286 0.4285714
3     8 0.8571429 0.1428571
4 Total 1.7012987 1.2987013

What they probably wanted:

> mtcars %>% tabyl(cyl, am) %>% adorn_totals() %>% adorn_percentages() 
    cyl         0         1
1     4 0.2727273 0.7272727
2     6 0.5714286 0.4285714
3     8 0.8571429 0.1428571
4 Total 0.5937500 0.4062500

Should adorn_totals print a warning if called on a modified tabyl, i.e., where the input is not the same as the core attribute? I'm okay with how the top example performs, but have to imagine most users want the latter.

Either way, need to publish guidance on the correct ordering of tabyl adornments.

@sfirke sfirke changed the title adorn_totals() succeeds after adorn_percentages(), but it should usually go the other way Create tabyl vignette that shows the order of adornments Oct 11, 2017
@sfirke sfirke mentioned this issue Oct 13, 2017
20 tasks
@sfirke
Copy link
Owner Author

sfirke commented Nov 3, 2017

completed this today as tabyl.Rmd

@sfirke sfirke closed this as completed Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant