Skip to contents

Extract the stressor response data from each sheet in the Excel workbook.

Usage

StressorResponseWorkbook(filename = NA)

Arguments

filename

A string. Relative file name to the stressor response Excel workbook.

Value

A list object of the main_sheet, stressor_names and stressor response data frames (sr_dat).

Details

For more information about data format requirements, see the Data Upload and Results Export tab of the associated Shiny App.

Uses readxl::read_excel() to load in workbook sheets:

  • Main sheet: meta data / cover sheet indicating:

    • stressor names

    • categories

    • interactions and linkages

    • scales

    • approximation function type

    • target life stages

    • contribution to survival or capacity parameters

    • stressor units

    • target model (CE or population models, or both)

  • all additional stressor-response sheets in workbook

    • context specific stressor-response curve data

    • sheet name must match (final) stressor names in Main sheet, otherwise a "Bad worksheet names" error is raised listing the mismatches.

    • sheets must contain columns for <stressor_name>, Mean System Capacity (%), SD, low.limit, and up.limit

Each stressor name may appear only once in the Main sheet: one stressor is always linked to exactly one stressor-response relationship. To link one stressor-response relationship to multiple life stages in the population model, use a comma-separated list in the Life_stages column (e.g., "stage_1, stage_2"); to affect multiple parameters (e.g., survival and capacity), create separate stressors, each with its own worksheet.

The Stressor_cat column is OPTIONAL and is normally a user label only (it is overwritten with the stressor name on load; the original value is preserved in Stressor_cat_orig). The one exception: if the same stressor name appears on several rows and every copy has a distinct, non-blank Stressor_cat, the rows are automatically renamed "<Stressor>_<Stressor_cat>" (with a warning). The curve worksheets and the stressor magnitude workbook must then use those full names. Note Excel limits worksheet names to 31 characters. The category value "Total_Mortality" is reserved (see StressorMagnitudeWorkbook) and is never used to rename.