avg_tree_curve {forestmangr} | R Documentation |
Generate the curve of a forest's average tree using the Kozak taper model
Description
Generate a ggplot curve of a forest's average tree using the Kozak taper model (Kozak, Munro and Smith, 1969).
Usage
avg_tree_curve(
df,
d,
dbh,
h,
th,
facet = NA,
color = NA,
eq = TRUE,
mirror = TRUE
)
Arguments
df |
A data frame. |
d |
Quoted name of the section diameter variable, in cm. |
dbh |
Quoted name of the diameter at breast height variable, in cm. |
h |
Quoted name of the section height variable, in meters. |
th |
Quoted name of the total height variable, in meters. |
facet |
Optional argument. If supplied with the Quoted name of a factor variable(s), this variable is used to divide the plot into facets. Default: |
color |
Quoted name of a variable. If supplied, this variable will be used to classify the data by color. Default: |
eq |
if |
mirror |
if |
Value
A ggplot object.
Author(s)
Sollano Rabelo Braga sollanorb@gmail.com
References
Kozak, A., Munro, D. D. and Smith, J. H. G. (1969) Taper Functions and their Application in Forest Inventory, The Forestry Chronicle, 45, pp. 278–283.
Examples
library(forestmangr)
data("exfm7")
head(exfm7)
# Get the data's average tree curve inserting the section diameter and height,
# total height and dbh variables:
avg_tree_curve(df=exfm7,d="di_wb",dbh="DBH",h="hi",th="TH",eq=FALSE)
# It's possible to get the average tree curve of each strata with the facet arg.,
# and divide the data by color with the color argument:
avg_tree_curve(exfm7,"di_wb","DBH","hi","TH","STRATA","GENCODE",FALSE)