-
Notifications
You must be signed in to change notification settings - Fork 130
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 in adorn_percentages(denominator = "col") #490
Comments
This code works fine for me. Double check that you don't have any other packages loaded that have conflicting function names? library(janitor)
#>
#> Attaching package: 'janitor'
#> The following objects are masked from 'package:stats':
#>
#> chisq.test, fisher.test
mtcars %>%
tabyl(am, cyl) %>%
adorn_totals(c("row", "col")) %>%
adorn_percentages(denominator = "col")
#> am 4 6 8 Total
#> 0 0.2727273 0.5714286 0.8571429 0.59375
#> 1 0.7272727 0.4285714 0.1428571 0.40625
#> Total 1.0000000 1.0000000 1.0000000 1.00000 |
I have the current development version of dplyr Could it be related? |
@sfirke I am able to reproduce this error with dplyr 1.0.99.9000 Either adorn on it's own works fine. And putting adorn_percentages() before adorn_totals() works (but of course yields slightly different results for the totals column. |
Yikes, thanks for reporting and figuring out the underlying issue! I'll
start looking into a fix.
…On Mon, Oct 17, 2022, 7:18 PM Jonathan Zadra ***@***.***> wrote:
@sfirke <https://github.com/sfirke> I am able to reproduce this error
with dplyr 1.0.99.9000
—
Reply to this email directly, view it on GitHub
<#490 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZYDECXIVOZS3RDCVYGUA3WDXNCTANCNFSM6AAAAAARHN2FQM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Past Sam (blame him) had relied on That behavior has changed according to dplyr's NEWS.md:
Seems reasonable. When I got to this line of the current code, I was kind of surprised it even works as-is. I'll refactor to base R, which it should have been in the first place. |
Fix adorn_percentages() and close #490
@mgacc0 feel free to install the latest commit here with |
Now it works as good as before. 👏 |
The text was updated successfully, but these errors were encountered: