Skip to contents

floodam.cba.sa 1.0.0.0

This is the first version of the library. It has been built on the basis of the collection of script from the archive CBA-DE-AS-2017-09-30.zip.

The work performed consisted in making anything consistent with a library:

  • keep only functions useful for the purpose
  • transform everything in snake_case (there may still be a few omissions…) to avoid any confusion with S3 functionning
  • avoid any global variable and assign strategy that was used in the archive
  • make some options for the library for default values that may be changed by an advanced user
  • work on messages to help user (this can be enhanced)

Enhancements

Everything is new. Main things to know are:

  • model_npv() is the model used to compute indicators. It is framed to be used without any change in used functions of library sensitivity.
  • load_data() allows to load safely data and make some checks. It initiates a log file.
  • read_input() is the function calls by load_data() ro read data. It deals several formats (“csv”, “ods”, “xlsx”).
  • analyse_uncertainty() is the main function that perform analyses from inputs loaded, both uncertainty and sensitivity. It also make a call to analyse_graphic(), and saves data.
  • calculate_nominal() allows to compute nominal results from inputs.
  • calculate_weight() calculates weights of flood scenarios depending on their rarety (either expressed as return periods or frequencies).
  • draw_all_parameter() draws all inputs values for all parameters, with a call to draw_parameter().
  • draw_parameter() draws inputs values for a given family of parameters.
  • analyse_graphic() performs and saves some graphical analyses from result of uncertainty and sensitivity analyses.
  • plot_uncertainty() allows to plot only graphics of uncertainty analysis.
  • plot_sobol() allows to plot only graphics of sensitivity analysis.
  • plot_explore() allows to plot graphics that explore the effects of the combination of key parameters on the value of NPV.
  • time_elpased() is a function to give message that some calls may be long, it also gives time elapsed by those calls.
  • options for the library ar defined and can be retrieved or changed with getOption("floodam.cba.sa").

Documentation