If you would like to keep the results your last SWAP model run, and/or the setup itself, you should use this function. You need to pass it the project_path of the last run project. To give your saved setup a name, pass one via the run_name parameter.

save_swap_run(project_path, run_name = NULL, verbose = F)

Arguments

project_path

path to the project directory (string)

run_name

name of run to be saved. (string)

verbose

print status? (flag)

Details

Once a run has been saved, it can be compared to other saved runs, and/or the next run you perform. This can be done with functions such as comparative_plot() or plot_statistics() r

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"

# this will throw a warning if "example_run" already exists (which it does)
save_swap_run(example_path, run_name = "example_run", verbose = TRUE)
#> Warning: 'C:\Users\mosh\AppData\Local\Programs\R\R-4.4.1\library\rswap\extdata\rswap_example_output\rswap_saved\example_run' already exists
#>all files succesfully saved to:
#> C:/Users/mosh/AppData/Local/Programs/R/R-4.4.1/library/rswap/extdata/rswap_example_output/rswap_saved/example_run