tests/testthat/test-spvar.R

test_that("test whether spvar function works well", {
  gzma = sf::read_sf(system.file('extdata/gzma.gpkg',package = 'sdsfun'))
  wt1 = inverse_distance_swm(gzma)
  expect_equal(spvar(gzma$PS_Score,wt1, method = 'cpp'),
               spvar(gzma$PS_Score,wt1, method = 'r'))
})

Try the sdsfun package in your browser

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

sdsfun documentation built on April 3, 2025, 8:39 p.m.