tests/testthat/test_concaveman.R

library(concaveman)
library(sf)
data(points)
context("main tests")

test_that("input and output formats works correctly", {
  expect_is(concaveman(sf::st_coordinates(points)), "matrix")
  expect_s3_class(concaveman(points), "sf")
  # input from classes that don't inherit from matrix, sf or SpatialPoints should throw an error
  expect_error(concaveman(array()))
})

Try the concaveman package in your browser

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

concaveman documentation built on July 1, 2020, 10:27 p.m.