emu_tabyl: A function to create weighted crosstables

View source: R/emu_tabyl.R

emu_tabylR Documentation

A function to create weighted crosstables

Description

This function allows you to create pivot tables for EMU, expanded and non expanded.

Usage

emu_tabyl(df, var1, var2, var3, expansion = f_exp, show_na = T, ...)

Arguments

df

The dataframe containing the EMU information.

var1

the column name of the first variable.

var2

(optional) the column name of the second variable (the rows in a 2-way tabulation).

var3

(optional) the column name of the third variable (the list in a 3-way tabulation).

expansion

the column name with the expansion factor to be used in the summarise

show_na

should counts of NA values be displayed? In a one-way tabyl, the presence of NA values triggers an additional column showing valid percentages(calculated excluding NA values).

Value

The pivot table with the expansion variable.

Examples

emu_tabyl(bd, Antes_viajes_2_6, show_na = F)

samesag/emu documentation built on Aug. 22, 2023, 3:19 p.m.