tests/testthat/test-2.R

library(ConR)

dummy_ex <- 
  data.frame(ddlat = rnorm(10)*10, 
             ddlon = rnorm(10)*10, taxa = rep("taxa", 10))

context("Test that subpop.comp outputs are correct length and objects")

test_that("subpop.comp", {
  
  SUB <- subpop.comp(XY = dummy_ex, resol_sub_pop = 25)
  
  expect_equal(length(SUB), 2)
  expect_equal(SUB$subpop, 10)

})
gdauby/ConR documentation built on Jan. 30, 2024, 11:10 p.m.