get_plots_cbh_lastdist {LadderFuelsR} | R Documentation |
This function plots the CBH of a segmented tree based on the fuel layer located at the last distance.
get_plots_cbh_lastdist(LAD_profiles, cbh_metrics, min_height=1.5)
LAD_profiles |
Original tree Leaf Area Density (LAD) profile (output of [lad.profile()] function in the leafR package). An object of the class text. |
cbh_metrics |
CBH metrics based on three criteria: maximum LAD percentage, maximum distance and last distance. (output of [get_cbh_metrics()] function). An object of the class text. |
min_height |
Numeric value for the actual minimum base height (in meters). |
A plot drawing the Crown Base Height (CBH) of the fuel layer located at the last distance.
Olga Viedma, Carlos Silva, JM Moreno and A.T. Hudak
library(ggplot2)
library(dplyr)
# LAD profiles derived from normalized ALS data after applying [lad.profile()] function
LAD_profiles <- read.table(system.file("extdata", "LAD_profiles.txt", package = "LadderFuelsR"),
header = TRUE)
LAD_profiles$treeID <- factor(LAD_profiles$treeID)
# Before running this example, make sure to run get_cbh_metrics().
if (interactive()) {
cbh_metrics <- get_cbh_metrics()
LadderFuelsR::cbh_metrics$treeID <- factor(LadderFuelsR::cbh_metrics$treeID)
trees_name1 <- as.character(cbh_metrics$treeID)
trees_name2 <- factor(unique(trees_name1))
# Generate plots for CBH based on the fuel layer at the last distance
plots_cbh_lastdist <- get_plots_cbh_lastdist(LAD_profiles, cbh_metrics, min_height=1.5)
}