Skip to contents

pop_model_hab_dens_clean

Usage

pop_model_hab_dens_clean(hab_dens = NA, keep_cv = TRUE)

Arguments

hab_dens

A data frame. Habitat density data frame with capacity columns.

keep_cv

Logical, default TRUE. If FALSE, all k_..._cv (capacity uncertainty) columns are dropped and every capacity value is treated as exact. The CEMPRA Shiny app runs with keep_cv = FALSE; use the R package directly to include capacity uncertainty.

Details

Cleans input parameters from csv. Capacity column names are lowercased and normalized (a missing _mean suffix is appended; spawner column name variants are renamed to the canonical k_stage_B_mean / k_stage_B_cv). Optional k_..._cv columns hold the coefficient of variation for the matching k_..._mean capacity estimate and are used for stochastic capacity draws in the population model (see build_k_for_proj_dd). A _cv column with no matching _mean column is dropped with a warning. Blank/NA cv values are treated as 0 (capacity used as an exact value).