# 5 bootstrap samples
tbl <- new_grouped_df(
tibble(x = rnorm(10)),
groups = tibble(".rows" := replicate(5, sample(1:10, replace = TRUE), simplify = FALSE))
)
# mean of each bootstrap sample
summarise(tbl, x = mean(x))
Run the code above in your browser using DataLab