# NOT RUN {
# Boostrap the mean of the mpg variable in the mtcars data set
slipper(mtcars,mean(mpg),B=100)
# Bootstrap the mean of the mpg variable with piping
mtcars %>% slipper(mean(mpg),B=100)
# Calculate a confidence interval using the quantiles method
mtcars %>% slipper(mean(mpg),B=100) %>%
filter(type=="bootstrap") %>%
summarize(ci_low = quantile(value,0.025),
ci_high = quantile(value,0.975))
# }
Run the code above in your browser using DataLab