Skip to contents

Unnest the data output from tidy_bootstrap().

Usage

bootstrap_unnest_tbl(.data)

Arguments

.data

The data that is passed from the tidy_bootstrap() function.

Value

A tibble

Details

This function takes as input the output of the tidy_bootstrap() function and returns a two column tibble. The columns are sim_number and y

It looks for an attribute that comes from using tidy_bootstrap() so it will not work unless the data comes from that function.

Author

Steven P. Sanderson II, MPH

Examples

tb <- tidy_bootstrap(.x = mtcars$mpg)
bootstrap_unnest_tbl(tb)
#> # A tibble: 50,000 × 2
#>    sim_number     y
#>    <fct>      <dbl>
#>  1 1           32.4
#>  2 1           24.4
#>  3 1           22.8
#>  4 1           18.1
#>  5 1           14.7
#>  6 1           33.9
#>  7 1           18.1
#>  8 1           22.8
#>  9 1           17.8
#> 10 1           15.8
#> # ℹ 49,990 more rows

bootstrap_unnest_tbl(tb) %>%
  tidy_distribution_summary_tbl(sim_number)
#> # A tibble: 2,000 × 13
#>    sim_number mean_val median_val std_val min_val max_val skewness kurtosis
#>    <fct>         <dbl>      <dbl>   <dbl>   <dbl>   <dbl>    <dbl>    <dbl>
#>  1 1              19.8       18.1    6.20    10.4    33.9    0.745     2.92
#>  2 2              20.6       19.2    5.65    10.4    32.4    0.284     2.82
#>  3 3              21.6       21      5.86    14.3    32.4    0.483     2.03
#>  4 4              23.9       21.4    6.92    14.3    33.9    0.278     1.68
#>  5 5              21.1       19.7    5.54    10.4    32.4    0.676     3.06
#>  6 6              19.0       19.2    5.39    10.4    32.4    0.697     3.36
#>  7 7              20.7       19.2    6.15    10.4    33.9    0.805     2.93
#>  8 8              19.7       19.7    6.16    10.4    30.4    0.140     1.96
#>  9 9              18.6       18.7    5.93    10.4    33.9    1.00      3.91
#> 10 10             20.2       19.2    5.20    13.3    33.9    1.16      3.99
#> # ℹ 1,990 more rows
#> # ℹ 5 more variables: range <dbl>, iqr <dbl>, variance <dbl>, ci_low <dbl>,
#> #   ci_high <dbl>