poly5_di | R Documentation |
Estimates the diameter at a given height of a tree from the diameter at breast height, total height and the coefficients of the 5th degree polynomial function that describes the tree's taper.
poly5_di(dbh, h, hi, coef)
dbh |
tree diameter at breast height, in centimeters. |
h |
total tree height, in meters. |
hi |
height at which the diameter will be calculated, in meters. |
coef |
numerical vector containing six coefficients of the 5th degree polynomial function that describes the tree's taper. |
a numeric value indicating the diameter at the given height.
library(dplyr) library(minpack.lm) library(timbeR) tree_scaling <- tree_scaling %>% mutate(did = di/dbh, hih = hi/h) poli5 <- lm(did~hih+I(hih^2)+I(hih^3)+I(hih^4)+I(hih^5),tree_scaling) coef_poli <- coef(poli5) dbh <- 25 h <- 20 di <- 5 poly5_di(dbh, h, di, coef_poli)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.