Description Usage Arguments Value Examples
Create a table that shows how a binary field distributes along another discrete variable. Supports all unique values in a variable, custom cut functions, or has a limited number of created helper cut functions for continious variables.
1 2 |
x |
a |
var |
a variable to break up the data, either all unique levels will
be used, or binned levels if a |
bivar |
a binary performance vector to destribute along |
extra_vars |
extra binary variables to distribute in addition to the |
cut_fmt |
a function used to cut a numeric column into descrete levels
to use in the table.
Default is set to
|
na_last |
set to |
decreasing |
if set to |
A bivariate table with the performance field distributed along the levels of the selected variable.
1 2 3 4 5 6 7 8 | # Create a bivariate of vs by cyl
bivar_table(x = mtcars, var = "cyl", bivar = "vs")
# add extra variable am
bivar_table(x = mtcars, var = "cyl", bivar = "vs", extra_vars = "am")
# Use custom predifined cut function
bivar_table(x = mtcars, var = "mpg", bivar = "vs", extra_vars = "am", cut_fmt = "quantile")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.