View source: R/compare_rates_between_groups.R
compare_rates_between_groups | R Documentation |
Compare Rates Between Groups
compare_rates_between_groups( data, group, event, test, input = "long", output = "console" )
data |
data |
group |
column in dataframe : group |
event |
column in dataframe : event |
test |
Type of test (fisher, n-1 two prop) |
input |
Defaults to "long" |
output |
"console" prints output to console; "tibble" returns tibble |
results
design = c("A","B") complete = c(34, 24) incomplete = c(317, 301) data <- data.frame(design, complete, incomplete) data <- data |> tidyr::pivot_longer(!design, names_to = "rate", values_to = "n") |> tidyr::uncount(n) compare_rates_between_groups(data, group = design, event = rate)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.