Get Stressor Magnitude Data from Excel Workbook
Source:R/StressorMagnitudeWorkbook.R
StressorMagnitudeWorkbook.RdExtract the stressor magnitude data from each sheet in the Excel workbook.
Details
For more information about data format requirements, see the Data Upload section of the vignette.
Optional From_Year and To_Year columns may be supplied. When present, they are
used only by the population model to restrict a stressor (per HUC) to an activation
window (active between From_Year and To_Year, inclusive); they are ignored by the
Joe Model. Stressors with missing/blank values, or files without these columns, are
applied to all years as before (backwards compatible).
The Stressor_cat column is OPTIONAL and is normally a user label only
(the original value is preserved in Stressor_cat_orig), with two
exceptions. (1) The reserved value "Total_Mortality" (exact spelling)
aggregates all rows so tagged into a single synthetic Total_Mortality
stressor per HUC: the Means are summed and the SDs are pooled in
quadrature (sqrt(sum(SD^2))), dropping NA components (all-NA -> 0). A
matching Total_Mortality curve must exist in the stressor-response
workbook for the aggregate to have an effect. Near-miss spellings warn.
(2) If the stressor-response workbook disambiguated duplicate stressor
names as "<Stressor>_<Stressor_cat>", dose rows are aligned to those
full names at model run time (see
align_dose_stressor_names, with a warning). Duplicate
stressor names within this workbook are otherwise left untouched:
legacy files legitimately list multiple component rows per stressor
with Stressor_cat as a component label.