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

tabyl() prints proportions labelled as percent #477

Closed
hammadsheikh opened this issue Mar 24, 2022 · 1 comment
Closed

tabyl() prints proportions labelled as percent #477

hammadsheikh opened this issue Mar 24, 2022 · 1 comment

Comments

@hammadsheikh
Copy link

Bug report

tabyl() is supposed to provide percentages but actually provides proportions. For instance, a value 0.5 in the "percent" column does not mean 0.5% as the label would indicate. Recommendation: either change the label to "proportion" or multiply the values by 100.


tabyl() is provide proportions (range 0-1) but labels them as "percent"

level <- rep(c("High", "Medium", "Low"), 20)
janitor::tabyl(level)
#>   level  n   percent
#>    High 20 0.3333333
#>     Low 20 0.3333333
#>  Medium 20 0.3333333

Feel free to assign task to me. More than willing to help.

@sfirke
Copy link
Owner

sfirke commented Mar 24, 2022

Hello, thanks for weighing in, hopefully you're enjoying janitor despite this flaw 😉 I've opened up a discussion for implementing a fix. It will involve at the least breaking people's code, and at the most splitting janitor into two different packages, so will be a non-trivial effort - but I appreciate your offer to help.

See also #300 and its linked issues.

@sfirke sfirke closed this as completed Mar 24, 2022
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

2 participants