View source: R/compare_props.R
compare_props | R Documentation |
Compare sample proportions across groups
compare_props(
dataset,
var1,
var2,
levs = "",
alternative = "two.sided",
conf_lev = 0.95,
comb = "",
adjust = "none",
data_filter = "",
envir = parent.frame()
)
dataset |
Dataset |
var1 |
A grouping variable to split the data for comparisons |
var2 |
The variable to calculate proportions for |
levs |
The factor level selected for the proportion comparison |
alternative |
The alternative hypothesis ("two.sided", "greater" or "less") |
conf_lev |
Span of the confidence interval |
comb |
Combinations to evaluate |
adjust |
Adjustment for multiple comparisons ("none" or "bonf" for Bonferroni) |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
envir |
Environment to extract data from |
See https://radiant-rstats.github.io/docs/basics/compare_props.html for an example in Radiant
A list of all variables defined in the function as an object of class compare_props
summary.compare_props
to summarize results
plot.compare_props
to plot results
compare_props(titanic, "pclass", "survived") %>% str()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.