wtab: Weighted Tabs

Description Usage Arguments Value

View source: R/tab_functions.R

Description

Run weighted crosstabs on one or two variables, using quoted inputs.

Usage

1
2
wtab(df, v1, v2 = "NULL", weight_var = NULL, sdesign = NULL,
  nsize = FALSE, ci = FALSE, to_factor = TRUE)

Arguments

df

input dataframe

v1

string name of 1st variable/column to tabulate

v2

string name of optional 2nd variable/column to tablulate. DEFAULT "NULL"

weight_var

string name of weight variable/column. DEFAULT NULL

sdesign

survey package surveydesign object. DEFAULT NULL

nsize

boolean flag to include n-sizes in output. DEFAULT FALSE

ci

boolean flag to include lower- and upper- bounds of confidence intervals. DEFAULT FALSE

to_factor

boolean flag to convert v1/v2 to factors, if needed. DEFAULT TRUE

Value

dataframe of tab results


jessezlotoff/rtabsplus documentation built on May 26, 2019, 3:33 p.m.