powered by
Title
add_prop_test( .df, x, n, p = NULL, CI_lower_name = "CI_lower", CI_upper_name = "CI_upper", p_name = "p", alternative = c("two.sided", "less", "greater"), conf.level = 0.95, correct = TRUE )
A data frame
The column/vector with the number of positive results
The column/vector/constant with the number of trials
Assumed proportion: Will add a p-value that the proportion is equal to p (default: 0.5)
Column names of the added columns
As for prop.test
prop.test
Data frame with columns added
count_by()
# NOT RUN { library(magrittr) if (requireNamespace("survival", quietly = TRUE)) { survival::aml %>% count_by(x) %>% add_prop_test(n, sum(n), rel) } # }
Run the code above in your browser using DataLab