tests/testthat/test-df2coverconvert.R

context("converting objects to coverconvert")

test_that("df2coverconvert is working", {
  x <- as(Kenya_veg@coverconvert, "list")$br_bl
  y <- as(Kenya_veg@coverconvert, "list")
  z <- Kenya_veg@coverconvert
  expect_is(df2coverconvert(y), "coverconvert")
  y2 <- y
  names(y2[[2]])[2] <- "bottom_value"
  expect_error(df2coverconvert(y2))
  expect_error(df2coverconvert(x))
  expect_is(df2coverconvert(x, "br_bl"), "coverconvert")
  expect_warning(z$cover1 <- z)
})

Try the vegtable package in your browser

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

vegtable documentation built on March 31, 2023, 10:33 p.m.