R/fitplotsize.R

Defines functions fitplotsize

Documented in fitplotsize

fitplotsize <-
function(plotsize, CV)
{
   if (length(plotsize) != length(CV))
      stop ("incompatible dimensions!")

   ini <- lm(log(CV) ~ log(plotsize))$coef

   fit <- nls(CV ~ a * plotsize^(-b),
      start = list(a = ini[1], b = ini[2]))
   fit
}

Try the biotools package in your browser

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

biotools documentation built on Aug. 7, 2021, 9:06 a.m.