Count ID Occurrences in Bootstrap Sample
Source:R/bootstrap_calculations_helpers.R
count_boot_id.RdCounts the number of times an ID appears in a bootstrap sample.
Examples
df_boot <- data.frame(id = c(1, 2, 1, 3, 1), id_boot = 1:5)
count_boot_id(1, df_boot) # returns 3
#> [1] 3
count_boot_id(4, df_boot) # returns 0
#> [1] 0