knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(nicethings)
library(purrr) library(nicethings) library(dplyr) library(glue) dat <- data.frame(prevalence = c(0.005, 0.01, 0.05, seq(0.1, 0.9, 0.05))) dat ors <- seq(1.25, 5, 0.25) ors dat <- ors %>% map( ~ dat %>% select(1) %>% nice_sampsi_cc(pi_0 = ., or = .x, power = 90, alpha = 5) %>% set_names(glue("OR >= {.x}")) ) %>% bind_cols(dat, .) dat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.