Skip to content

Instantly share code, notes, and snippets.

@hilaryparker
Created December 29, 2015 23:19
Show Gist options
  • Save hilaryparker/6e6d3190eb3290263344 to your computer and use it in GitHub Desktop.
Save hilaryparker/6e6d3190eb3290263344 to your computer and use it in GitHub Desktop.
get bootstrap histogram quickly
library(dplyr)
library(broom)
library(ggplot2)
dat <- data.frame(x = runif(50000)) %>% tbl_df()
res <- dat %>% bootstrap(100) %>% do(tidy(lm(x ~ 1, .)))
ggplot(res, aes(x = estimate)) + geom_histogram()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment