WritePmsf: Write a 'pmsf.txt' file

View source: R/functioncollection_export.R

WritePmsfR Documentation

Write a 'pmsf.txt' file

Description

This is a small convenience function to export a 'partial model setup file' from R.

Usage

WritePmsf(x, filename)

Arguments

x

The object to be written, an integer vector containing SUBIDs.

filename

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

Details

Pmsf files are represented as integer vectors in R. The total number of subcatchments in the file are added as first value on export. pmsf.txt files need to be ordered as downstream sequence.

Value

No return value, called for export to text files.

See Also

AllUpstreamSubids, which extracts upstream SUBIDs from a GeoData dataframe.

Examples

te <- ReadGeoData(filename = system.file("demo_model", "GeoData.txt", package = "HYPEtools"))
WritePmsf(x = te$SUBID[te$SUBID %in% AllUpstreamSubids(3564, te)], filename = tempfile())


rcapell/RHYPE documentation built on Feb. 28, 2024, 3:11 p.m.