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           17.3
#>  2 1           19.2
#>  3 1           26  
#>  4 1           22.8
#>  5 1           18.7
#>  6 1           14.7
#>  7 1           27.3
#>  8 1           15.8
#>  9 1           21.4
#> 10 1           32.4
#> # ℹ 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              21.2       21.4    5.95    10.4    32.4   0.296      2.28
#>  2 2              18.3       17.8    5.05    10.4    30.4   0.398      2.90
#>  3 3              19.7       21      4.31    10.4    30.4   0.194      3.42
#>  4 4              20.8       21      6.67    10.4    32.4   0.301      2.20
#>  5 5              18.3       17.3    6.02    10.4    33.9   0.954      3.47
#>  6 6              18.0       16.4    6.19    10.4    32.4   0.367      2.27
#>  7 7              23.1       21.5    6.51    10.4    33.9  -0.0129     1.89
#>  8 8              19.9       19.7    6.80    10.4    32.4   0.193      1.96
#>  9 9              19.7       19.7    3.68    14.3    30.4   0.758      4.19
#> 10 10             22.3       21      6.86    10.4    33.9   0.520      2.16
#> # ℹ 1,990 more rows
#> # ℹ 5 more variables: range <dbl>, iqr <dbl>, variance <dbl>, ci_low <dbl>,
#> #   ci_high <dbl>