Learn R Programming

HYPEtools (version 1.6.4)

HypeSubidChecks: Check HYPE SUBID properties

Description

Quickly query vectors of HYPE sub-basin IDs (SUBID) for various properties.

Usage

IsHeadwater(subid, gd)

IsOutlet(subid, gd)

IsRegulated(subid, gd, dd = NULL, ld = NULL)

Value

The functions return a logical vector of the same length as subid, with NA values for all SUBIDs which do not exist in gd.

Arguments

subid

Numeric, vector of SUBIDs to be queried

gd

HypeGeoData or base data frame with columns SUBID and MAINDOWN, typically an imported GeoData.txt file.

dd

Data frame, typically an imported DamData.txt file. Defaults to NULL. dd or ld has to be provided in IsRegulated.

ld

Data frame, typically an imported LakeData.txt file. Defaults to NULL. dd or ld has to be provided in IsRegulated.

Details

These are convenience functions to query subbasin properties. Some functions can be inefficient if applied to many or all subbasins of a HYPE model setup and more efficient functions may exist in HYPEtools, see links in See also section below or browse the package index.

See Also

AllUpstreamSubids(); AllDownstreamSubids(); OutletSubids(); OutletIds()

Examples

Run this code
te <- ReadGeoData(filename = system.file("demo_model", "GeoData.txt", package = "HYPEtools"))
IsHeadwater(subid = 40556, gd = te)
IsHeadwater(subid = te$SUBID, gd = te)

Run the code above in your browser using DataLab