Learn R Programming

Rrepest (version 1.5.4)

grouped_sum_freqs: 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)

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.

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).

Examples

Run this code
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"))

Run the code above in your browser using DataLab