Nothing
df1 <- data.frame(station = c("1","1","1","2","2","2"),
species = c("Acidostoma neglectum",
"Acar botanica",
"Acrocirrus validus",
"Acteocina bullata",
"Austrohelice crassa",
"Capitella nonatoi"),
count = c(1, 2, 4, 5, 3, 7))
test_that("H' with zeroes H", {
H <- ambiR::Hdash(df1)$H
expect_equal(round(H$H, 6), 2.367795)
})
test_that("H' with zeroes N", {
H <- ambiR::Hdash(df1)$H
expect_equal(H$N, 22)
})
df2 <- data.frame(station = c("1","1","1","2","2","2","2"),
species = c("Acidostoma neglectum",
"Acar botanica",
"Acrocirrus validus",
"Acteocina bullata",
"Austrohelice crassa",
"Capitella nonatoi",
"this is not a species"),
count = c(1, 2, 4, 5, 3, 7, 4))
test_that("H' with missing H", {
H <- ambiR::Hdash(df2)$H
expect_equal(round(H$H, 6), 2.367795)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.