This function combines the modeled and observed data of the current run, along with all the modeled and observed data of all the saved runs (for a single variable) and returns them in tidy format, easy to use for plotting, etc.
Details
This is once again an internal function that is made available due to it possibly being useful for the end user.
Examples
# path to sample results (only for package internal example, you don't need
# this function)
example_path <- system.file(package = "rswap", "extdata/rswap_example_output")
# in your own projects, you would use something like this:
# example_path <- "C:/path/to/swap_folder/example_project"
melt_swap_runs(example_path, "WC", depth = 15, verbose = TRUE)
#> ℹ Observed data already loaded, not reloading. (use force=TRUE to force reload)
#> # A tibble: 108 × 5
#> DATE value tag run variable
#> <date> <dbl> <chr> <chr> <chr>
#> 1 2002-01-31 0.309 past example_run WC_15
#> 2 2002-02-28 0.335 past example_run WC_15
#> 3 2002-03-31 0.282 past example_run WC_15
#> 4 2002-04-30 0.308 past example_run WC_15
#> 5 2002-05-31 0.281 past example_run WC_15
#> 6 2002-06-30 0.239 past example_run WC_15
#> 7 2002-07-31 0.389 past example_run WC_15
#> 8 2002-08-31 0.215 past example_run WC_15
#> 9 2002-09-30 0.206 past example_run WC_15
#> 10 2002-10-31 0.268 past example_run WC_15
#> # ℹ 98 more rows