Description Usage Arguments Examples
Computes arbitrary bootstrap statistics on univariate data. NOTE: Both empirical functions and bootstrapping functions will be computed over the grouping variables currently specified for the data frame.
1 | tidyboot_mean(data, column, nboot = 1000, na.rm = FALSE)
|
data |
A data frame. |
column |
A column of |
nboot |
The number of bootstrap samples to take (defaults to
|
na.rm |
A logical value indicating whether NA values should be stripped before the computation proceeds. |
1 2 3 4 5 6 7 8 | ## Mean and 95% confidence interval for 500 samples from two different normal distributions
require(dplyr)
gauss1 <- data_frame(value = rnorm(500, mean = 0, sd = 1), condition = 1)
gauss2 <- data_frame(value = rnorm(500, mean = 2, sd = 3), condition = 2)
df <- bind_rows(gauss1, gauss2)
df %>%
group_by(condition) %>%
tidyboot_mean(column = value)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.