tests/testthat/test-calc_haversine_distance.R

test_that("Distance calculations make sense", {
  expect_equal(
    calc_haversine_distance(
      c(lat = 44.121268, lng = -73.903734),
      c(lat = 43.121268, lng = -74.903734)
    ),
    137270.5,
    tolerance = 0.005
  )
})

Try the terrainr package in your browser

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

terrainr documentation built on Oct. 4, 2023, 5:07 p.m.