Not really enough to test this:
suppressPackageStartupMessages({
library(purrr)
library(rsample)
})
mep <- dplyr::tibble(
id =
c("Sub01", "Sub01", "Sub01", "Sub01", "Sub01", "Sub01", "Sub01", "Sub01", "Sub01", "Sub01"),
interv =
c("excitation", "excitation", "excitation", "excitation", "excitation", "excitation", "excitation", "excitation", "excitation", "excitation"),
mep =
c(0.377, 0.494, 1.55, 0.965, 1.04, 0.748, 1.14, 0.416, 0.0532, 1.11),
time =
c("pre", "pre", "pre", "pre", "pre", "pre", "pre", "pre", "pre", "pre")
)
boots_mep <- bootstraps(mep, times = 2000, apparent = TRUE)
get_mean <- function(x) mean(x[[1]][3][[1]], na.rm = TRUE)
lapply(boots_mep$splits, get_mean) %>% head()
#> [[1]]
#> [1] 0.78932
#>
#> [[2]]
#> [1] 0.78932
#>
#> [[3]]
#> [1] 0.78932
#>
#> [[4]]
#> [1] 0.78932
#>
#> [[5]]
#> [1] 0.78932
#>
#> [[6]]
#> [1] 0.78932