R/SSarrhenius.R

SSarrhenius <-
    selfStart(~ k*area^z,
              function(mCall, data, LHS, ...)
{
    xy <- sortedXyData(mCall[["area"]], LHS, data)
    value <- as.vector(coef(lm(log(pmax(xy[,"y"],1)) ~ log(xy[,"x"]))))
    value[1] <- exp(value[1])
    names(value) <- mCall[c("k","z")]
    value
},
c("k","z"))

Try the vegan package in your browser

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

vegan documentation built on May 29, 2024, 7:28 a.m.