tests/testthat/test-flex-zones-ref.R

fpath <- system.file("testdata", package = "smerc")
fname <- paste(fpath, "/flex5_zones_ref.rda", sep = "")
load(fname)

data(nydf)
coords <- as.matrix(nydf[, c("x", "y")])
data(nyw)
flex5_zones <- flex.zones(coords, nyw, k = 5)

context("check flex5_zones_ref w/ flex5_zones")
test_that("flex.zones result matches reference", {
  expect_equal(flex5_zones_ref, flex5_zones)
})

Try the smerc package in your browser

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

smerc documentation built on Oct. 10, 2023, 5:07 p.m.