count_groups: Count Observations per Groups

View source: R/count_groups.R

count_groupsR Documentation

Count Observations per Groups

Description

I tend to forget the syntax that works with stats::aggregate.

Usage

count_groups(x, ...)

Arguments

x

A data.frame.

...

Columns in x.

Value

A data.frame with the counts per groups.

See Also

Other statistics: column_sums(), relative_difference(), round_half_away_from_zero(), sloboda(), weighted_variance()

Examples

count_groups(mtcars, "am", "gear")
RUnit::checkEquals(dplyr::count(mtcars, am, gear),
                   count_groups(mtcars, "am", "gear"), checkNames = FALSE)

fritools documentation built on June 8, 2025, 11:59 a.m.