tests/testthat/test-samp_depth.R

data("dmj_defol")

s_vec <- c(2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3)

test_that("samp_depth() counts trees consistently", {
  test_vec <- sample_depth(dmj_defol)[1:20, 2]
  expect_equal(test_vec, s_vec)
})

Try the dfoliatR package in your browser

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

dfoliatR documentation built on Aug. 10, 2023, 1:08 a.m.