effect_counts | R Documentation |
The type of effect size depends on the number of selected columns:
One categorical column: see effect_counts_one
Multiple categorical columns: see effect_counts_items
Cross tabulations:
One categorical column and one grouping column: see effect_counts_one_grouped
Multiple categorical columns and one grouping column: see effect_counts_items_grouped (not yet implemented)
Multiple categorical columns and multiple grouping columns: effect_counts_items_grouped_items (not yet implemented)
By default, if you provide two column selections, the second column is treated as categorical. Setting the metric-parameter to TRUE will call the appropriate functions for correlation analysis:
One categorical column and one metric column: see effect_counts_one_cor (not yet implemented)
Multiple categorical columns and one metric column: see effect_counts_items_cor (not yet implemented)
Multiple categorical columns and multiple metric columns:effect_counts_items_cor_items (not yet implemented)
effect_counts(data, cols, cross = NULL, metric = FALSE, clean = TRUE, ...)
data |
A data frame. |
cols |
A tidy column selection, e.g. a single column (without quotes) or multiple columns selected by methods such as starts_with(). |
cross |
Optional, a grouping column. The column name without quotes. |
metric |
When crossing variables, the cross column parameter can contain categorical or metric values. By default, the cross column selection is treated as categorical data. Set metric to TRUE, to treat it as metric and calculate correlations. |
clean |
Prepare data by data_clean. |
... |
Other parameters passed to the appropriate effect function. |
A volker tibble.
library(volker)
data <- volker::chatgpt
effect_counts(data, sd_gender, adopter)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.