tests/testthat/test-df2vegtable.R

context("calculating diversity indices")

test_that("veg_diversity is working", {
  library(vegan)
  data(dune)
  data(dune.env)
  dune_veg <- data.frame(
    species = colnames(dune), t(dune),
    stringsAsFactors = FALSE, check.names = FALSE
  )
  expect_is(df2vegtable(dune_veg, species = 1), "vegtable")
})

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.