Shorthand for {dplyr} functions called consecutively.

count_arrange(data, ..., sort = FALSE, .by_group = FALSE)

Arguments

data

A data.frame.

...

Additional arguments passed to internal {base}/{stats} functions.

sort

if TRUE will sort output in descending order of n

.by_group

If TRUE, will sort first by grouping variable. Applies to grouped data frames only.

Value

A tibble.

Details

Note that arranging is performed on the column used to compute the value for dplyr::count(), which is different than simply calling dplyr::count(x, ..., sort = TRUE) (which sorts by the output column n). For this reason, no sort option is provided (to prevent the user from mistakenly using this function in such a manner).

Borrowing from the {tidyverse}

The logic for handling ... is borrowed from a reivew of the internals for tidyr::unite() and tidyr::gather().

See also

Other dplyr-combos: arrange_distinctly, pull_distinctly