WriteBasinOutput {HYPEtools}R Documentation

Write a basin output '[SUBID].txt' file

Description

Function to export a basin output file from R.

Usage

WriteBasinOutput(x, filename, dt.format = "%Y-%m-%d")

Arguments

x

The object to be written, a dataframe with hypeunit attribute, as an object returned from ReadBasinOutput.

filename

A character string naming a file to write to. Windows users: Note that Paths are separated by '/', not '\'.

dt.format

Date-time format string as in strptime. Incomplete format strings for monthly and annual values allowed, e.g. '\%Y'.

Details

WriteBasinOutput exports a dataframe with headers and formatting options adjusted to match HYPE's basin output files.

Value

No return value, called for file export.

Examples

te <- ReadBasinOutput(filename = system.file("demo_model", "results", "0003587.txt", 
                      package = "HYPEtools"))
WriteBasinOutput(x = te, filename = tempfile())


[Package HYPEtools version 1.6.2 Index]