This function reads in a SWAP main file and returns the parameter set in a dataset form. It also converts the tables in the main file into .csv format and saves them in the rswap directory. In this format it is easy to make alterations to the SWAP parameters and tables.

parse_swp_file(project_path, swap_file = "swap.swp", verbose = F)

Arguments

project_path

path to project directory (string)

swap_file

optional swap main file name (string) defaults to "swap.swp"

verbose

print status? (flag)

Value

Returns SWAP parameters in a dataframe format and path to where the tables were saved in a csv format (until i figure out how to return an array of dataframes)

Details

I am working on getting tables to be returned as a "list of dataframes" instead of saving them as a file.

Also, this parsing technique was designed to work with the SWAP example cases. If your SWAP main file structure does something different, you might run into trouble.

This function will be expanded to work with more SWAP input files like .dra