count_boot_id: Count ID Occurrences in Bootstrap Sample

View source: R/bootstrap_calculations_helpers.R

count_boot_idR Documentation

Count ID Occurrences in Bootstrap Sample

Description

Counts the number of times an ID appears in a bootstrap sample.

Usage

count_boot_id(x, dfb)

Arguments

x

ID value.

dfb

Data frame of bootstrap sample.

Value

Integer count of occurrences.

Examples

df_boot <- data.frame(id = c(1, 2, 1, 3, 1), id_boot = 1:5)
count_boot_id(1, df_boot)  # returns 3
count_boot_id(4, df_boot)  # returns 0

forestsearch documentation built on Nov. 15, 2026, 9:06 a.m.