Description Usage Arguments Value Examples
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
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")
|
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' |
Returns the cross tab results...
1 2 | ezr.crosstab(mtcars, mtcars %>% select(cyl), mtcars %>% select(vs))
ezr.crosstab(mtcars, 'cyl', 'vs')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.