tests/testthat/test_MaxDt.R

context("Find maximum doubling time (MaxDt)")

test_that("MaxDt returns the correct doubling time", {
  r_in <- 1.2
 
  expect_equal(round(log(2) / r_in, 5),  
               round(growthcurver:::MaxDt(r = r_in), 5))
})

Try the growthcurver package in your browser

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

growthcurver documentation built on Oct. 23, 2020, 5:47 p.m.