subset_vpu: Subset by Vector Processing Unit

View source: R/subset_nhdplus.R

subset_vpuR Documentation

Subset by Vector Processing Unit

Description

Calls subset_rpu for all raster processing units for the requested vector processing unit.

Usage

subset_vpu(fline, vpu, include_null_rpuid = TRUE, run_make_standalone = TRUE)

Arguments

fline

sf data.frame NHD Flowlines with comid, pathlength, lengthkm, hydroseq, levelpathi, rpuid, vpuid, and arbolatesu (dnhydroseq is required if tocomid is not provided).

vpu

character e.g. "01"

include_null_rpuid

logical default TRUE. Note that there are some flowlines that may have a NULL rpuid but be included in the vector processing unit.

run_make_standalone

logical default TRUE should the run_make_standalone function be run on result?

Value

data.frame containing subset network

Examples


source(system.file("extdata/sample_data.R", package = "nhdplusTools"))

sample_flines <- sf::read_sf(sample_data, "NHDFlowline_Network")

subset_vpu(sample_flines, "07")


nhdplusTools documentation built on June 22, 2024, 10:36 a.m.