tests/testthat/test_add_pathlength.R

test_that("get_terminal", {
  fl <- sf::read_sf(system.file("extdata", "walker.gpkg", package = "hydroloom"))

  fl <- add_toids(fl)

  pl <- add_pathlength(dplyr::select(fl, -Pathlength))

  expect_equal(fl$COMID, pl$COMID)

  expect_equal(fl$Pathlength, pl$pathlength_km)
})

Try the hydroloom package in your browser

Any scripts or data that you put into this service are public.

hydroloom documentation built on May 29, 2024, 2:46 a.m.