get_plots_gap_fbh {LadderFuelsR} | R Documentation |
This function plots gaps and fuel layers base height (fbh) in the vertical tree profile (VTP).
get_plots_gap_fbh (LAD_profiles,gap_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 |
gap_cbh_metrics |
data frame with gaps (distances) and fuel base heights (output of [get_gaps_fbhs()] function). An object of the class text. |
min_height |
Numeric value for the actual minimum base height (in meters). |
A plot drawing by lines the height of gaps and fuel layers bases in tiff format.
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_gaps_fbhs().
if (interactive()) {
gap_cbh_metrics <- get_gaps_fbhs()
LadderFuelsR::gap_cbh_metrics$treeID <- factor(LadderFuelsR::gap_cbh_metrics$treeID)
# Generate plots for gaps and fbhs
plots_gaps_fbhs <- get_plots_gap_fbh(LAD_profiles, gap_cbh_metrics, min_height=1.5)
}