silv_lorey_height {silviculture} | R Documentation |
Calculates Lorey's Height
Description
Tree's mean height weighted by basal area
Usage
silv_lorey_height(height, g, ntrees = NULL)
Arguments
height |
Numeric vector of heights |
g |
Numeric vector of basal areas |
ntrees |
Optional. Numeric vector of number of trees per hectare. Use this argument when you have aggregated data by diametric classes (see details). |
Details
The function calculates Lorey's mean height according to:
h_L = \frac{\sum n_i g_i h_i}{\sum n_i g_i}
When ntrees is not provided (i.e. ntrees = NULL
) the formula is simply
the weighted mean of the provided heights and basal areas:
h_L = \frac{\sum g_i h_i}{\sum g_i}
Value
A numeric vector
Examples
## Calculate Lorey's Height by plot and species
library(dplyr)
inventory_samples |>
mutate(g = silv_basal_area(diameter)) |>
summarise(
lh = silv_lorey_height(height, g),
.by = c(plot_id, species)
)
[Package silviculture version 0.1.0 Index]