| HypeDataExport {HYPEtools} | R Documentation |
Write HYPE data files
Description
These are simple convenience wrapper functions to export various HYPE data files from R.
Usage
WriteAquiferData(x, filename, verbose = TRUE)
WriteOutregions(x, filename, verbose = TRUE)
WriteBranchData(x, filename, verbose = TRUE)
WriteCropData(x, filename, verbose = TRUE)
WriteDamData(x, filename, verbose = TRUE)
WriteFloodData(x, filename, verbose = TRUE)
WriteLakeData(x, filename, verbose = TRUE)
WriteMgmtData(x, filename, verbose = TRUE)
WritePointSourceData(x, filename, verbose = TRUE)
WriteForcKey(x, filename)
WriteGlacierData(x, filename, verbose = TRUE)
Arguments
x |
The object to be written, a dataframe as returned from the |
filename |
A character string naming a path and file name to write to. Windows users: Note that Paths are separated by '/', not '\'. |
verbose |
Logical, display informative warning messages if columns contain |
Details
Hype data file exports, simple fwrite wrappers with formatting options adjusted to match HYPE file
specifications:
In most files, HYPE requires NA-free input in required columns, but empty values are
allowed in additional comment columns which are not read by HYPE. Informative warnings will be thrown if NAs are
found during export. Character string lengths in comment columns of HYPE data files are restricted to 100 characters,
the functions will return with a warning if longer strings were exported.
Value
No return value, called for export to text files.
Examples
te <- ReadForcKey(filename = system.file("demo_model", "ForcKey.txt", package = "HYPEtools"))
WriteForcKey(x = te, filename = tempfile())