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

More ard_categorical() efficiencies 😿 #176

Open
ddsjoberg opened this issue Feb 14, 2024 · 0 comments
Open

More ard_categorical() efficiencies 😿 #176

ddsjoberg opened this issue Feb 14, 2024 · 0 comments
Assignees

Comments

@ddsjoberg
Copy link
Collaborator

I was fixing an edge-case bug in ard_categorical() when the variable was all NA. To correct this, I made an update to the way the denominator N was calculated. After the update, there is now a space for an efficiency gain when denominator = c("column", "row", "cell"), the most common cases.

  1. Instead of handling denominator = c("column", "row", "cell") entirely separately, we can instead include useNA="always" for the primary variable tabulation, then calculate the Ns by performing a grouped sum of "n".
  2. The other cases allowed in denominator will still be handled in the same way they are now. But as these are less common calculations, I expect an overall gain in efficiency.
@ddsjoberg ddsjoberg self-assigned this Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant