grouped_sum_freqs: Grouped frequency counts

View source: R/pv_rrepest_frequencies.R View source: R/grouped_frequencies.R

grouped_sum_freqsR Documentation

Grouped frequency counts

Description

Computes a data frame with frequency counts.

Usage

grouped_sum_freqs(data, small.level, big.level, w = NULL)

grouped_sum_freqs(data, small.level, big.level, w = NULL)

Arguments

data

(data frame) Data to analyze.

small.level

(string vector) all variables to get grouped sum.

big.level

(string vector) Must be fully contained in variables from small.level

w

(string) Numeric variable from which to get weights (if NULL then 1).

Value

Data frame containing the frequency counts

Data frame with frequencies from the grouped sum of small.level and big.level used for getting percentages.

Examples

grouped_sum_freqs(data = mtcars,small.level = c("cyl","am"),big.level = c("cyl"))

grouped_sum_freqs(data = mtcars,small.level = c("cyl","gear"),big.level = c("cyl"))

Rrepest documentation built on April 4, 2025, 2:07 a.m.