stab: Tabs - Quoted Input

Description Usage Arguments Value See Also

Description

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

Usage

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

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

collapses

list of categories to collapse as "new name"=c(inputs) DEFAULT list()

Value

dataframe of tab results

See Also

wtab, utab which this function wraps


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