Skip to contents

Check validity of the 'uncertainty' slot of a Case object.

Usage

check_case_uncertainty(object)

Arguments

object

An object of class Case.

Value

Character vector of error messages, or character(0) if valid.

Details

If the uncertainty slot is NULL, no checks are performed and character(0) is returned. When present, the function performs the following checks:

  • Required columns: presence of columns defined in getOption("floodam.cba")[["uncertainty_col"]] ("parameter", "min", "max", "type").

  • Parameter completeness: verifies that all expected parameters are present (cost_investment_<action>, cost_maintenance_<action>, period_<flood>, hydraulic_<flood>, stake_<stake>).

  • Range consistency: verifies that min <= max for all parameters.

  • Variation type: verifies that type values belong to admissible types defined in getOption("floodam.cba")[["uncertainty_type_admissible"]] ("relative", "absolute").

Author

Frédéric Grelot, frederic.grelot.1994_cran@m4x.org