getCoefficients: Calculating GLM Coefficients

Description Usage Arguments Value Examples

Description

This is a function that takes a tree dataframe and performs calculations based on funclass and funvar, on the column listed in "response"

Usage

1
2
getCoefficients(trees, functionRecord, response = "diayr",
  predictor = "light")

Arguments

trees

The trees database, trimmed for light characters.

functionRecord

A parameter that takes "slope" or "intercept" as its possible return value.

response

A string matching the response column's name in tree, or the "y"

predictor

A string matching the predictor column's name in trees, or the "x". Needed only for the "glm" function. Does not currently support multiple predictors.

Value

This function returns a vector of calculated responses.

Examples

1
2
dummydata <- data.frame(x=runif(50, 0, 2), y=runif(50, 0,25), SPCD=1)
getCoefficients(dummydata, "slope", response="y", predictor="x")

ecology-rocks/MakeMyForests documentation built on May 15, 2019, 7:57 p.m.