
Format flood return periods and integration weights
format_flood.RdFormat return periods and calculate trapezoidal integration weights for a
Sector or Case object, optionally including the global summary.
Value
If x is a Sector: a matrix with 2 rows (period and weight) and
flood events as columns. If x is a Case: a named list of such matrices
for each sector (and "global" if add_total = TRUE).
Details
Integration weights are computed from return periods using calculate_weight().
For a
Sectorobject, return periods inx["flood"]are extracted and bound into a 2-row matrix (periodandweight).For a
Caseobject, return periods are retrieved fromx["period"]across all sectors. Ifadd_total = TRUE(default) and multiple sectors are present, the"global"aggregation row is retained; otherwise it is excluded.
See also
Other sensitivity analysis:
format_sector(),
perform_sa(),
plot_sa(),
plot_sa_triplet(),
plot_sobol(),
plot_uncertainty(),
prepare_sa(),
prepare_sa_calendar(),
prepare_sa_cost(),
prepare_sa_flood(),
prepare_sa_impact(),
prepare_uncertainty(),
prop_negative()
Author
Frédéric Grelot, frederic.grelot.1994_cran@m4x.org
Examples
case = import_case(
system.file("extdata", "case", "complete.ods", package = "floodam.cba")
)
#> import Case from /tmp/RtmpvMoJJK/temp_libpath2b69f6f14b9e9/floodam.cba/extdata/case/complete.ods
#> ... done
format_flood(case)
#> $sector_1
#> min med max
#> period 10.000 100.0000 1.0e+03
#> weight 0.045 0.0495 4.5e-03
#>
#> $sector_2
#> min med max
#> period 5.00 50.000 5e+02
#> weight 0.09 0.099 9e-03
#>
#> $sector_3
#> min med max
#> period 10.00000000 75.0000 1.000000e+03
#> weight 0.04333333 0.0495 6.166667e-03
#>
#> $global
#> min med max
#> period 8.33333333 75.0000 8.333333e+02
#> weight 0.05333333 0.0594 6.066667e-03
#>
format_flood(case["sector"][[1]])
#> min med max
#> period 10.000 100.0000 1.0e+03
#> weight 0.045 0.0495 4.5e-03