freq: Frequency table

View source: R/explore.R

freqR Documentation

Frequency table

Description

Count the occurrences of values in a column, optionally within groups.

Usage

freq(data, column, by = NULL, prop = FALSE, sort = TRUE, ...)

Arguments

data

A data frame, or a single path to a delimited text file. In file mode the second argument is taken as the grouping column(s).

column

Name of the column to tabulate.

by

Optional grouping column or columns.

prop

Whether to include proportions.

sort

Whether to sort rows by descending frequency.

...

In file mode, reader options such as where, delim.

Value

A basetable containing frequencies, and proportions when requested.


basetable documentation built on Sept. 18, 2026, 9:13 a.m.