Writes out HS objects in order to use them outside R. By default the function writes the geometry using st_write, but where list columns are modified since they cannot be written by st_write. Alternatively the function can output a timeseries specified by the user (runoff, discharge, or control).

HSwrite(x, filename, what = "geometry", ...)

Arguments

x

A HS object.

filename

Filename to write to.

what

What to write. Accepts "geometry" for writing the river network or the runoff grid, or "discharge_ts", "runoff_ts", "control_ts" for writing out a .csv table of the associated timeseries.

...

options passed to st_write.