-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implemented sorting in all functions except for two-way tables. #29
base: main
Are you sure you want to change the base?
Conversation
…ng is printed if `sort = TRUE`.
tab2
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this pull request. Could you please update NEWS.md
and add a test?
R/tab.R
Outdated
#' | ||
#' tab2(x, ..., m = TRUE) | ||
#' | ||
#' @param x A vector, data.frame, or tibble. | ||
#' @param ... A comma separated list of unquoted variable names or positions. Select helpers from [dplyr](https://dplyr.tidyverse.org/reference/select.html) and [tidyselect](https://rdrr.io/cran/tidyselect/man/select_helpers.html) are supported. | ||
#' @param m If `TRUE` (the default), missing values are reported. | ||
#' @param sort If `TRUE` (default is `FALSE`), will show the largest groups at the top. Sorting is not implemented for two-way tables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth mentioning here that the default behavior is to sort (ascending) by value and that sort = TRUE
changes this behavior to sort (descending) by frequency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
I introduced a typo ('# missing) on line 25
Implemented sorting in all functions except for two-way tables, where a warning is printed if
sort = TRUE
. Updated the help documentation accordingly.