tests/testthat/test-add_polid.R

context("add_polid")

data(net)
nets <- sf::st_as_sf(net)
net <- net[1, ]
bb <- sf::st_as_sf(sf::st_as_sfc(sf::st_bbox(nets)))
bb$id <- "a"
a <- add_polid(polyg = bb, street = nets, by = "id")

test_that("emis_merge works", {
  expect_equal(add_polid(polyg = bb, street = nets, by = "id")$id[1],
                "a")
})

Try the vein package in your browser

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

vein documentation built on April 30, 2023, 1:10 a.m.