bootstrap {broom} | R Documentation

## Set up bootstrap replicates of a dplyr operation

### Description

The `bootstrap()` function is deprecated and will be removed from an upcoming release of broom. For tidy resampling, please use the rsample package instead.

### Usage

    bootstrap(df, m, by_group = FALSE)

### Arguments

`df` | a data frame
`m` | number of bootstrap replicates to perform
`by_group` | If `TRUE`, then bootstrap within each group if `df` is a grouped tbl.

### Details

This code originates from Hadley Wickham (with a few small corrections) here:

https://github.com/hadley/dplyr/issues/269

### Examples

    ## Not run:
    library(dplyr)
    mtcars %>% bootstrap(10) %>% do(tidy(lm(mpg ~ wt, .)))

    ## End(Not run)

[Package broom version 0.5.2 Index]