# NOT RUN {
library(ggplot2)
library(dplyr)
bootstrap_sample_means <- pennies_resamples %>%
group_by(name) %>%
summarize(sample_mean = mean(year))
ggplot(bootstrap_sample_means, aes(x = sample_mean)) +
geom_histogram(binwidth = 2.5) +
labs(x = "sample mean year", title = "Bootstrap distribution of sample mean year")
# }
Run the code above in your browser using DataLab