add_pathlength: Add Path Length

View source: R/add_pathlength.R

add_pathlengthR Documentation

Add Path Length

Description

Generates the main path length to a basin's terminal path.

Requires id, toid, and length_km hydroloom compatible attributes.

Usage

add_pathlength(x)

## S3 method for class 'data.frame'
add_pathlength(x)

## S3 method for class 'hy'
add_pathlength(x)

Arguments

x

data.frame network compatible with hydroloom_names.

Value

data.frame containing pathlength_km

Examples

x <- sf::read_sf(system.file("extdata/new_hope.gpkg", package = "hydroloom"))

x <- add_toids(x)

x <- add_pathlength(x)

plot(x["Pathlength"])


hydroloom documentation built on Sept. 11, 2024, 8:20 p.m.