View source: R/avg_tree_curve.R
avg_tree_curve | R Documentation |
Generate a ggplot curve of a forest's average tree using the Kozak taper model (Kozak, Munro and Smith, 1969).
avg_tree_curve(
df,
d,
dbh,
h,
th,
facet = NA,
color = NA,
eq = TRUE,
mirror = TRUE
)
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 |
A ggplot object.
Sollano Rabelo Braga sollanorb@gmail.com
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.