Learn R Programming

silviculture (version 0.2.0)

silv_stand_dominant_diameter: Calculates the dominant diameter

Description

Calculates the dominant diameter using Assman and Friedrich method, or Weise method

Usage

silv_stand_dominant_diameter(
  diameter,
  ntrees = NULL,
  which = "assman",
  quiet = FALSE
)

Value

A numeric vector

Arguments

diameter

Numeric vector with diameter classes

ntrees

Optional. Numeric vector with number of trees per hectare. Use this argument when you have aggregated data by diametric classes (see details).

which

The method to calculate the dominant diameter (see details)

quiet

if TRUE, messages will be supressed

Details

The dominant diameter \(D_0\) is the mean diameter of the 100 thickest trees per hectare. Therefore, diameter and ntrees should be vectors of the same length.

  • Assman: calculates the \(D_0\) as the mean diameter of the 100 thickest trees per hectare

  • Weise: calculates the \(D_0\) as the quadratic mean diameter of the 20% thickest trees per hectare

Examples

Run this code
## calculate d0 for inventory data grouped by plot_id and species
library(dplyr)
inventory_samples |>
mutate(dclass = silv_tree_dclass(diameter)) |>
  summarise(
    height = mean(height, na.rm = TRUE),
    ntrees = n(),
    .by    = c(plot_id, species, dclass)
  ) |>
  mutate(
    ntrees_ha = silv_density_ntrees_ha(ntrees, plot_size = 10),
    d0        = silv_stand_dominant_diameter(dclass, ntrees_ha),
    .by       = c(plot_id, species)
  )

Run the code above in your browser using DataLab