Skip to contents

`make_curve()` makes the damage curve, for a crop. This function is called in `calculate_damaging()`.

Usage

make_curve(
  damaging.core,
  damaging.complement,
  calendar,
  level = floodam.agri::LEVEL,
  combine,
  current = floodam.agri::CURRENT,
  type = "data.frame"
)

Arguments

damaging.core

data.frame, damage function for each type of phenomena impacting a crop. See `inst/extdata/default/damagement/<crop>/damaging.core.csv`.

damaging.complement

data.frame, complementary damaging information for a crop. See `inst/extdata/default/damagement/<crop>/damaging.complement.csv`.

calendar

data.frame, crop calendar.

level

list giving levels for hazard parameters (current, duration, height, week), default to floodam.agri::LEVEL.

combine

list of combine methods for each type of phenomena used to group damaging function.

current

data.frame, correspondance between velocity qualitative classes and their numeric value. Default to floodam.agri::CURRENT.

type

character, should output be of class data.frame or a list, default to "data.frame".

Value

if `type` is "data.frame", `make_curve()` returns a data.frame

if `type` is "list", `make_curve()` returns a list of 4D-arrays.