R/SSgleason.R

SSgleason <-
    selfStart(~ k + slope*log(area),
              function(mCall, data, LHS)
{
    ## Gleason is a linear model: starting values are final ones
    xy <- sortedXyData(mCall[["area"]], LHS, data)
    value <- as.vector(coef(lm(xy[,"y"] ~ log(xy[,"x"]))))
    names(value) <- mCall[c("k","slope")]
    value
},
c("k","slope"))

Try the vegan package in your browser

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

vegan documentation built on May 2, 2019, 5:51 p.m.