View source: R/stats_extensions.R
normal_interval | R Documentation |
Apply a confidence interval to values in a dataframe based on the normal distribution.
normal_interval(.data, mean, std_dev, conf = 0.95)
.data |
Data frame; a confidence interval will be applied to each row in the data frame. |
mean |
Mean of the distribution |
std_dev |
Standard deviation of the distribution |
conf |
Confidence interval, must be between |
Other interval verbs:
beta_interval()
# create example df
mean <- rnorm(10, 100, 20)
std_dev <- rnorm(10, 80, 10)
example <- dplyr::bind_cols(mean, std_dev)
colnames(example) <- c("mean", "std_dev")
# apply the default confidence interval of 0.95
normal_interval(example, mean, std_dev)
# apply a custom confidence interval
normal_interval(example, mean, std_dev, conf = 0.99)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.