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

Missing x-axis labels in boxwork() when all data missing in a group. #101

Open
kylebaron opened this issue Aug 2, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@kylebaron
Copy link
Contributor

See report from @janellelennie in #100

The box_labels() function needs refactoring to retain x-axis "levels" that contain no non-NA data.

function (df, x, y) {
  .xcol <- rlang::sym(x)
  .ycol <- rlang::sym(y)
  df <- mutate(df, notna = !is.na(!!.ycol))
  df <- group_by(df, !!.xcol)
  .sum <- summarize(df, n = sum(notna), N = n_distinct(ID[notna]))
  .sum <- ungroup(.sum)
  as.data.frame(.sum)
}
@kylebaron kylebaron self-assigned this Aug 2, 2024
@kylebaron kylebaron added the bug Something isn't working label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant