knitr::opts_chunk$set( collapse = FALSE, comment = "#>" )
dendrometry
r packageThe r package dendrometry
is an implementation in R language of forests
estimations methods such as dendrometric parameters of trees and structural
parameters of tree populations. The objective is to provide an user-friendly R
package for researchers, ecologists, foresters, statisticians, loggers and
others persons who deal with forest inventory data. Useful conversion of angle
value from degree to radian, conversion from angle to slope (in percentage) and
their reciprocals as well as principal angle determination are also included.
Position and dispersion parameters usually found in forest studies are
implemented. The package contains Fibonacci series, its extensions and the
Golden Number computation.
Please cite this package in publication or anywhere it comes to be
useful for you. Using citation
R function is a simple way to get this
package references on R interface. The function also provides a BibTeX
entry for La-TeX users.
citation("dendrometry")
Before use the package, load it first.
library(dendrometry)
Tree
dataLet consider the package built-in Tree
data.
data("Tree") head(Tree)
To see Tree
data description, use
help("Tree")
Use dbh
function to estimate trees diameters (DBH).Type ?dbh
for help.
Tree$DBH <- dbh(Tree$circum) head(Tree)
Use height
function to estimate tree height.Type ?height
for help.
Tree$upHeight <- height( distance = Tree$dist, top = Tree$up, bottom = Tree$down, type = "angle", angleUnit = "deg" ) Tree$futHeight <- height( distance = Tree$dist, top = Tree$fut, bottom = Tree$down, type = "angle", angleUnit = "deg" ) head(Tree)
Tree$DBH <- round(Tree$DBH, 2) Tree$upHeight <- round(Tree$upHeight, 2) Tree$futHeight <- round(Tree$futHeight, 2) Tree
Ones could need converting angle values to slope. The angle2slope
function
does it easily. The reciprocal of this function is slope2angle
.
Tree$up.slope <- angle2slope(Tree$up) Tree$up.slope <- round(Tree$up.slope) Tree
The basal area of each tree is computed with basal_i
function.
Tree$basal <- basal_i(dbh = Tree$DBH / 100) Tree$basal <- round(Tree$basal, 4) Tree
DBH is divided by 100 in order to convert DBH to meter (m). This conversion is optional and depends on the study methodology.
The Lorey's mean height is computed via loreyHeight
function.
Lorey <- loreyHeight(basal = Tree$basal, height = Tree$upHeight) Lorey
Note: Simple mean of height is different from Lorey's mean height.
Height.Mean <- mean(Tree$upHeight) Height <- c(Height.Mean, Lorey) names(Height) <- c("Mean of Height(m)", "Lorey height(m)") Height
The mean diameter is computed with diameterMean
function.
Dm <- diameterMean(Tree$DBH) Dm
Note: Simple mean of diameter is different from mean diameter (Dm).
Diam <- mean(Tree$DBH) Diameter <- c(Diam, Dm) names(Diameter) <- c("Simple mean of Diameter(cm)", "Mean diameter(cm)") Diameter
This section is illustrated with the Logging
data set.
Logging
datasetThe Logging
data are in a data frame with twenty five observations and eight
variables assumed collected on trees and/or logs. Type ?Logging
for details.
data("Logging") summary(Logging)
factorize
a datasetThe variable tree
is considered as character rather than factor. To
overcome that and make easier manipulation one changes character variables to
factor variables. To do that for whole dataset, use function factorize
. Type
?factorize
for help.
class(Logging$tree) Logging <- factorize(data = Logging) class(Logging$tree) summary(Logging) head(Logging, 4) attach(Logging)
This coefficient expresses the ratio between the diameter (or circumference) at
mid-height of the bole and the diameter (or circumference) measured at breast
height. The decrease
function is used to compute this coefficient. Type
?decrease
for help.
Decrease <- decrease(middle = diametreMedian, breast = diametreBase) Decrease
The reduction coefficient is the ratio between the difference in size at breast
height and mid-height on the one hand, and the size at breast height on the
other. It is thus the complement to 1 of the coefficient of decrease.
The reducecoef
function is used to compute the reduction coefficient. Type
?reducecoef
for help.
Reduce <- reducecoef(middle = diametreMedian, breast = diametreBase) Reduce
The average metric decay expresses the difference, in centimeters per meter,
between the diameter (or circumference) at breast height and its diameter at
mid-height of a stem related to the difference between the height at mid-height
and that at breast height. The average metric decay is computed using
decreaseMetric
function.Type ?decreaseMetric
for help.
DecMetric <- decreaseMetric( dmh = diametreMedian, dbh = diametreBase, mh = hauteur / 2 ) DecMetric
In case of DBH considered at other height than 1.3 m, the breast height is set
via bh
argument of decreaseMetric
function.
DecMetric1.5 <- decreaseMetric( dmh = diametreMedian, dbh = diametreBase, mh = hauteur / 2, bh = 1.5 ) DecMetric1.5
The wood volume of logs and trees is computed withe volume
function. Type
?volume
for help. The Huber
, Smalian
, Cone
and Newton
methods are
implemented. When successive
is set TRUE, the selected method is implemented
on all log belonging to the same tree. The sum of logs volume is returned per
tree. Type ?volume
for details.
# HUBER VolHub <- volume(height = hauteur, dm = diametreMedian, method = "huber") # SMALIAN VolSmal <- volume( height = hauteur, do = diametreBase, ds = diametreSection, method = "smalian" ) # CONE VolCone <- volume( height = hauteur, do = diametreBase, ds = diametreSection, method = "cone" ) # NEWTON VolNew <- volume( height = hauteur, do = diametreBase, dm = diametreMedian, ds = diametreSection, method = "newton" )
Make a data frame of tree volumes per method.
TreeVol <- data.frame(tree, VolHub, VolSmal, VolCone, VolNew) head(TreeVol)
Now, let consider the variable tree
as the tree to which belong the log; such
that each observation of the data set stands for characteristics of a log. It's
like trees are cut in many logs. Then those logs are measured. All logs from the
same tree have the same value for variable tree
. Then let compute trees volume
with sum of all logs obtained from each tree. The successive
argument should
then be set to TRUE
.
# HUBER VolHubSuc <- volume( height = hauteur, dm = diametreMedian, method = "huber", successive = TRUE, log = tree ) # SMALIAN VolSmalSuc <- volume( height = hauteur, do = diametreBase, ds = diametreSection, method = "smalian", successive = TRUE, log = tree ) # CONE VolConSuc <- volume( height = hauteur, do = diametreBase, ds = diametreSection, method = "cone", successive = TRUE, log = tree ) # NEWTON VolNewSuc <- volume( height = hauteur, do = diametreBase, dm = diametreMedian, ds = diametreSection, method = "newton", successive = TRUE, log = tree ) VolNewSuc volume( height = hauteur, do = diametreBase, dm = diametreMedian, ds = diametreSection, method = "newton", successive = TRUE, log = tree )
Make a data frame of tree volumes per method.
TreeVolSuc <- data.frame(tree = unique(tree), VolHubSuc, VolSmalSuc, VolConSuc, VolNewSuc) TreeVolSuc
The shape coefficient of the tree is the ratio of the actual volume of the tree to the volume of a cylinder having as base the surface of the section at 1.3 m (or a given breast height) and as length, the height of the tree.
Shape <- shape(volume = VolNewSuc, height = hauteur, dbh = perimetreMedian) Shape
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.