printCI | R Documentation |
Takes a vector of length two and prints out a confidence interval in a user specified format.
printCI(x, fmt)
x |
A vector of length two containing the lower and upper bounds of a confidence interval |
fmt |
A format string to be used by |
A string containing the formatted CI
James Curran
sprintf
n = 100 x = rnorm(n) mx = mean(x) se = sd(x)/sqrt(n) ci = mx + qnorm(c(0.025,0.975))*se printCI(ci, '%5.2f')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.