tests/testthat/test_growth_funs.R

test_that("growth functions compute length and time correctly", {
  time <- 100
  linf <- 125
  k <- 0.15
  t0 <- -0.5
  len <- linf * (1 - exp(-k * (time - t0)))
  expect_equal(vbgf(time, linf, k, t0), len)
  expect_equal(inv_vb(len, linf, k, t0), time)
})

Try the optistock package in your browser

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

optistock documentation built on Aug. 24, 2023, 5:06 p.m.