tests/testthat/test-3.R

library(ConR)
data(dataset.ex)

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

context("Test that IUCN.eval outputs are correct length and objects")

test_that("IUCN.eval", {
  
  Results <- IUCN.eval(dummy_ex)
  
  expect_equal(class(Results), "data.frame")
  expect_equal(dim(Results), c(1,10))
  

})

Try the ConR package in your browser

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

ConR documentation built on July 2, 2020, 2:33 a.m.