Learn R Programming

hydroloom (version 1.1.0)

add_pathlength: 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 data.frame add_pathlength(x)

# S3 method for hy add_pathlength(x)

Value

data.frame containing pathlength_km

Arguments

x

data.frame network compatible with hydroloom_names.

Examples

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

x <- add_toids(x)

x <- add_pathlength(x)

plot(x["Pathlength"])

Run the code above in your browser using DataLab