tests/testthat/test-DB.R

describe("DB()", {
  it("can estimate the stem diameter at the lowest major living branch.", {
    expect_equal(DB(20), 16.05529)
    expect_equal(DB(0), 0)
  })
  it("return `NA` when the diameter inputed is NA.", {
    expect_equal(DB(NA), NA)
  })
})

Try the javateak package in your browser

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

javateak documentation built on April 3, 2025, 10:44 p.m.