nullToNA <- function(x) {
x[sapply(x, is.null)] <- NA
return(x)
}
sample_size <- function(CI, me, p){
zstar <- qnorm(1-((1-CI)/2))
sampleSize <- zstar^2 * p*(1 - p)/ me^2
return(sampleSize)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.