Rarefy abundance-like focal counts
timefish_rarefy_abundance.RdConvenience wrapper around timefish_rarefy_focal().
Usage
timefish_rarefy_abundance(
data,
N = NULL,
id_col,
total_col,
reps = 1000,
replace = FALSE,
total_includes_focal = TRUE,
seed = NULL,
cores = NULL,
benchmark_cores = TRUE,
core_candidates = NULL,
show_parallel_info = TRUE
)Arguments
- data
A data frame.
- N
Number of individuals to draw. If
NULL, uses the minimum positive value fromtotal_col.- id_col
Column name with focal counts (for example abundance of a focal group or species).
- total_col
Column name with total individuals.
- reps
Number of random replicates per row.
- replace
Logical. Should sampling be with replacement?
- total_includes_focal
Logical. If
TRUE(default),total_colalready includes the focal counts inid_col.- seed
Optional integer seed for reproducible runs.
- cores
Number of CPU cores to use. If
NULL, the user can choose interactively (or defaults to1in non-interactive sessions).- benchmark_cores
Logical. If
TRUE, print an estimated runtime table by core count before running.- core_candidates
Optional vector of candidate core counts to benchmark (for example
2:8).- show_parallel_info
Logical. If
TRUE, print available cores, the benchmark table, and selected cores.