powered by
Function to export a basin output file from R.
WriteBasinOutput(x, filename, dt.format = "%Y-%m-%d")
No return value, called for file export.
The object to be written, a dataframe with hypeunit attribute, as an object returned from ReadBasinOutput.
hypeunit
ReadBasinOutput
A character string naming a file to write to. Windows users: Note that Paths are separated by '/', not '\'.
Date-time format string as in strptime. Incomplete format strings for monthly and annual values allowed, e.g. '\%Y'.
format
strptime
WriteBasinOutput exports a dataframe with headers and formatting options adjusted to match HYPE's basin output files.
WriteBasinOutput
te <- ReadBasinOutput(filename = system.file("demo_model", "results", "0003587.txt", package = "HYPEtools")) WriteBasinOutput(x = te, filename = tempfile())
Run the code above in your browser using DataLab