tests/testthat/test_TAtInflection.R

library(growthcurver)
context("Find the inflection point of the logistic equation")

test_that("The time t at the inflection point is as expected", {
  k_in <- 0.5
  n0_in <- 1e-5
  r_in <- 1.2
  expect_equal(round(log((k_in - n0_in) / n0_in ) / r_in, 5),
               round(TAtInflection(k_in, n0_in, 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.