Skip to contents

Count observations by grouping variables.

Usage

count_data(data, grouping_vars, sort_n_desc = FALSE)

Arguments

data

Input data frame.

grouping_vars

A character vector containing grouping variables of a data table.

sort_n_desc

A boolean value indicating whether the whole data frame should be sorted in descending order by n. Default is FALSE.

Value

A (grouped) data frame.