Description Usage Arguments Value Examples
View source: R/f_compare_with_baseline.R
This function calculates percentage difference comparing scenario with its baseline. It could be used with raw or averaged data.
1 2 3 4 5 6 | get_diff_from_baseline(
df,
baseline_period = NULL,
type_of_diff = "r",
type_of_baseline = "f"
)
|
df |
Data.frame of imported output.*** SWAT file with extract_watersheds_output function |
baseline_period |
Vector of two values. First with year of beginning |
type_of_diff |
String from one letter. 'r' stands for relative difference in percentages #' and 'a' for absolute in absolute values. of baseline period and second with end of it. Those two values should have been used in naming scenario folder. Example (c("2000", "2019")) |
type_of_baseline |
String from one letter. 'f' stands for fixed period difference and "c" for changing. It means "f" would calculate all the difference with one period (example 2000-2019) baseline and "c" with each period baselines (example 2000-2019, 2040-2059, 2080-2099) |
Data.frame with all numeric columns recalculated as percentage from baseline.
1 | ##get_diff_from_baseline(df, NULL, "r", "c")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.