We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The adorn_totals() name argument is ignored when used on a 3 way tabyl:
adorn_totals()
name
suppressPackageStartupMessages(require(janitor)) mtcars %>% tabyl(gear, cyl, vs) %>% adorn_totals(name = "NAME DOES NOT WORK ON 3-WAY") #> $`0` #> gear 4 6 8 #> 3 0 0 12 #> 4 0 2 0 #> 5 1 1 2 #> Total 1 3 14 #> #> $`1` #> gear 4 6 8 #> 3 1 2 0 #> 4 8 2 0 #> 5 1 0 0 #> Total 10 4 0 mtcars %>% tabyl(gear, cyl) %>% adorn_totals(name = "TOTALS NAME WORKS ON 2-WAY") #> gear 4 6 8 #> 3 1 2 12 #> 4 8 4 0 #> 5 2 1 2 #> TOTALS NAME WORKS ON 2-WAY 11 7 14
Created on 2019-07-10 by the reprex package (v0.2.1)
The text was updated successfully, but these errors were encountered:
Thanks for reporting. Looks like I just need to add the name argument to the recursive call on line 22 here: https://github.com/sfirke/janitor/blob/master/R/adorn_totals.R#L22
I'll add that plus a unit test.
Sorry, something went wrong.
adorn_totals now applies name to 3-way tabyl
4d29629
fixes #306
adorn_totals now applies name to 3-way tabyl (#307)
23e667c
Awesome, thank you! And so fast :)
sfirke
Successfully merging a pull request may close this issue.
The
adorn_totals()
name
argument is ignored when used on a 3 way tabyl:Created on 2019-07-10 by the reprex package (v0.2.1)
The text was updated successfully, but these errors were encountered: