crosstab_wave: Make a weighted crosstab of row proportions, by wave

Description Usage Arguments Details Value Examples

View source: R/MakeCrosstabWave.R

Description

crosstab_wave returns a data.frame containing a weighted crosstab of two variables by wave.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
crosstab_wave(
  mulaw,
  x,
  y,
  z = zpollenddate,
  weight = zwave_weight,
  remove = c(""),
  n = TRUE,
  pct_type = "row",
  format = "wide",
  ...
)

Arguments

mulaw

The data.frame containing the version of the integrated file you wish to use

x

The independent variable

y

The dependent variable

z

The third variable, defaults to zpollenddate

weight

The weighting variable, defaults to zwave_weight

remove

An optional character vector of values to remove from final table (e.g. DK/Ref). This will not affect any calculations made. The vector is not case-sensitive.

n

Logical. If TRUE add a row total column

pct_type

one of "row" or "cell"

format

one of "wide" or "long

...

further arguments passed to pollster::crosstab_3way, such as unwt_n

Details

This is a wrapper around pollster::crosstab_3way() where the default value of z is zpollenddate

Value

A tibble

Examples

1
crosstab_wave(integ, zpid3, g40)

jdjohn215/MLSPTools documentation built on Sept. 2, 2020, 1:16 a.m.