Learn R Programming

HYPEtools (version 1.6.4)

WritePmsf: 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)

Value

No return value, called for export to text files.

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.

See Also

AllUpstreamSubids, which extracts upstream SUBIDs from a GeoData dataframe.

Examples

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

Run the code above in your browser using DataLab