tests/testthat/test-MAPI_EstimateHalfwidth.R

library("testthat")
library("mapi")
test_that("MAPI_EstimateHalfwidth", {
    data("samples")
    hw50 <- MAPI_EstimateHalfwidth(samples, crs=3857, beta=0.5)
    expect_equal(hw50, 286.835888252914)
    hw25 <- MAPI_EstimateHalfwidth(samples, crs=3857, beta=0.25)
    expect_equal(hw25, 143.417944126457)
})

Try the mapi package in your browser

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

mapi documentation built on July 3, 2025, 5:08 p.m.