freq_vars_by: Frequency of several variables by group

View source: R/strata.R

freq_vars_byR Documentation

Frequency of several variables by group

Description

Frequency of several variables by group

Usage

freq_vars_by(data, vars, by)

Arguments

data

data.frame() data

vars

list of variables to compute frequency on

by

name of grouping variable

Value

data.frame() Returned columns:

variable

variable name

,

level

level of the variable

n

frequency of the level in the group

n_total

Total of non missing value in for the variable in the group

prop_raw

Proportion of the level

group...

One column of each group, with the value of the current group

An attribute "missing" contains missing count for each variable by group


cturbelin/ifnBase documentation built on Nov. 5, 2023, 12:54 p.m.