`fit_complement()` transforms format of a crop damaging.complement data.frame to have numeric values instead of qualitative physiological phases and velocity classes. Called in `make_curve()`.

fit_complement(damaging.complement, calendar, current = floodam.agri::CURRENT)

Arguments

damaging.complement

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

calendar

data.frame, crop calendar.

current

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

Value

data.frame, transformed damaging.complement data.frame in coherence with needed format for `make_curve()`.