Description Usage Arguments Examples
View source: R/modelling_misc.R
Calculates conversion ratio table with counts and proportions
1 |
order |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | n <- 200
sample_dt <- data.table::data.table(
ColA = sample(letters[1:5], n, replace = TRUE),
ColB = sample(letters[1:5], n, replace = TRUE),
Target = runif(n) <= 0.1)
cr_table(sample_dt, 'ColA', 'Target', prop_count = FALSE)
cr_table(sample_dt, 'ColA', 'Target', prop_count = TRUE)
cr_table(sample_dt, 'ColA', 'Target')
cr_table(sample_dt, c('ColA','ColB'), 'Target')
cr_table(sample_dt, c('ColA','ColB'), 'Target', order = 'cr')
cr_table(sample_dt, c('ColA','ColB'), 'Target', order = 'count')
cr_table(sample_dt, c('ColA','ColB'), 'Target', order = 'prop')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.