Learn R Programming

nhdplusTools (version 0.3.16)

get_terminal: Get Terminal ID

Description

Get the ID of the basin outlet for each flowline.

Usage

get_terminal(x, outlets)

Arguments

x

two column data.frame with IDs and toIDs. Names are ignored.

outlets

IDs of outlet flowlines

Examples

Run this code
# NOT RUN {
source(system.file("extdata", "walker_data.R", package = "nhdplusTools"))

fl <- dplyr::select(prepare_nhdplus(walker_flowline, 0, 0),
                    ID = COMID, toID = toCOMID)

outlet <- fl$ID[which(!fl$toID %in% fl$ID)]

get_terminal(fl, outlet)

# }

Run the code above in your browser using DataLab