Skip to content

Implemented sorting in all functions except for two-way tables.#29

Open
theshiniss wants to merge 3 commits into
gvelasq:mainfrom
theshiniss:issue028
Open

Implemented sorting in all functions except for two-way tables.#29
theshiniss wants to merge 3 commits into
gvelasq:mainfrom
theshiniss:issue028

Conversation

@theshiniss

@theshiniss theshiniss commented May 25, 2024

Copy link
Copy Markdown

Implemented sorting in all functions except for two-way tables, where a warning is printed if sort = TRUE. Updated the help documentation accordingly.

@theshiniss theshiniss changed the title Implemented sorting in all functions except for tab2. Implemented sorting in all functions except for two-way tables. May 25, 2024

@gvelasq gvelasq left a comment

Copy link
Copy Markdown
Owner

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?

Comment thread R/tab.R Outdated
#' @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.

@gvelasq gvelasq May 25, 2024

Copy link
Copy Markdown
Owner

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

theshiniss and others added 2 commits May 27, 2024 17:44
I introduced a typo ('# missing) on line 25
@gvelasq

gvelasq commented Dec 7, 2025

Copy link
Copy Markdown
Owner

Closes #28

@gvelasq gvelasq linked an issue Dec 7, 2025 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Enhancement Request: Add sorting functionality to tab function

2 participants