nice_rr | R Documentation |
Calculate risk ratios from line-list data
nice_rr(n1, d1, n2, d2)
n1 |
numerator for the reference group |
d1 |
denominator for the reference group |
n2 |
numerator for the comparator group |
d2 |
denominator for the comparator group |
data(smokers) lc_agg <- smokers %>% dplyr::group_by(smoker) %>% dplyr::summarise(denominator = dplyr::n(), numerator = sum(lung_cancer)) %>% tidyr::pivot_wider(names_from = smoker, values_from = c(denominator, numerator)) lc_agg nice_rr(n1 = lc_agg$numerator_0, d1 = lc_agg$denominator_0, n2 = lc_agg$numerator_1, d2 = lc_agg$denominator_1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.