ezr.crosstab: Title Cross Tab (Table)

Description Usage Arguments Value Examples

Description

Generate a cross table of the fields you are interested in. Input of fields should be with names in quotes or as a result of a dplyr pipe similar to mtcars

Usage

1
2
3
4
ezr.crosstab(dataset, row_field, column_field,
  percent_denominator = "row", rounding_digits = 0,
  position = "front", add_totals = TRUE, numerical_breaks = 5,
  round_breaks = 0, style = "equal")

Arguments

dataset

Dataframe

row_field

Ideally place the grouping variable here.

column_field

Ideally place the target or outcome interested in comparinghere.

percent_denominator

Valid values are 'row','all','col'. What is the demoninator for percents? Row is default so place target in column.

rounding_digits

Default is 0 so whole percents are shown

position

Default is front. Determines what is placed in the ()s

add_totals

Add the totals? Default is true.

numerical_breaks

N breaks for numerical values

round_breaks

Digits to round numerical values to.

style

Valid values are 'equal','pretty','quantile','percentile'. Default is 'equal'

Value

Returns the cross tab results...

Examples

1
2
 ezr.crosstab(mtcars, mtcars %>% select(cyl), mtcars %>% select(vs))
ezr.crosstab(mtcars, 'cyl', 'vs')

jmp1989/easyr documentation built on May 20, 2019, 7:25 a.m.