Skip to contents

select_damage() extracts from the "sheet" slot of a "damage_function" object the values of a given typology filtered by duration (d_min), salinity (salinite), and optionally velocity (v_min) and period (p_min) when present in the sheet.

Usage

select_damage(
  damage,
  sheet,
  typology,
  duration = 0,
  salinity = "non",
  velocity = 0,
  period = 1
)

Arguments

damage

list of data.frames corresponding to the "sheet" slot of a "damage_function" object.

sheet

character, name (or pattern) of the sheet to extract from damage.

typology

character, column name to extract (either an asset typology or "h_min").

duration

character or numeric, values of d_min to filter. Default to 0.

salinity

character, values of salinite to filter. Default to "non".

velocity

numeric or character, values of v_min to filter (used only if "v_min" is a column of sheet). Default to 0.

period

numeric or character, values of p_min to filter (used only if "p_min" is a column of sheet). Default to 1.

Value

A matrix of selected values where each column corresponds to a combination of hazard parameters and each row to a water height step.