tests/testthat/test-advent-benchmark.R

test_that("proper sums work, agree with _r and geos", {
  xx <- as.numeric(c(x_benchmark$row, x_benchmark$row[1]))
  yy <- as.numeric(c(x_benchmark$col, x_benchmark$col[1]))

  expect_equal(polygon_area(cbind(xx, yy)),  170900015202589, tolerance = 1e-14)
})

Try the area package in your browser

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

area documentation built on May 29, 2024, 11:13 a.m.