compare_rates_between_groups {uxr} | R Documentation |
Compare Rates Between Groups
Description
Compare Rates Between Groups
Usage
compare_rates_between_groups(
data,
group,
event,
test,
input = "long",
output = "console"
)
Arguments
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 |
Value
results
Examples
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)
[Package uxr version 0.2.0 Index]