group_counts: Count by group(s)

Description Usage Arguments Value Examples

View source: R/groupCounts.R

Description

This function returns the counts of specified group(s) within a tibble, sorted in decreasing order of count

Usage

1

Arguments

data

A tibble of interest the contains the data to pull counts from

...

A list of variables present in the tibble to group-by. When not present, returns the total count in the tibble

Value

A tibble containing the summarized counts for each group in the variable(s) specified, sorted in decreasing order of count

Examples

1
2
3
4
group_counts(datateachr::vancouver_trees, neighbourhood_name)
datateachr::vancouver_trees %>% group_counts(neighbourhood_name)
group_counts(datateachr::vancouver_trees, neighbourhood_name, curb, height_range_id)
group_counts(tibble::as_tibble(iris), Species)

pattiey/STAT545B documentation built on Dec. 22, 2021, 6:41 a.m.