silv_lorey_height: Calculates Lorey's Height

View source: R/deprecated-funs.R

silv_lorey_heightR Documentation

Calculates Lorey's Height

Description

#' @description [Deprecated]

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

Tree's mean height weighted by basal area

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)
  )

silviculture documentation built on Nov. 5, 2025, 7:13 p.m.