Learn R Programming

silviculture

silviculture is an R package designed to streamline the analysis of forestry and forest inventory data, offering a range of functions for common silvicultural analysis. It aims to support forest management and research by providing a flexible toolkit for data manipulation and summary.

Installation

You can install the development version of silviculture from GitHub with:

# install.packages("pak")
pak::pak("Cidree/silviculture")

Roadmap

This package is currently under active development and may still contain bugs or unstable features. I do not recommend using it in real-world applications at this stage, as it may be prone to errors.

Nomenclature

The package uses the following terms as function arguments consistently:

  • biomass: mass of the tree or part of the tree in kilograms.

  • dclass: the diametric class of the tree. In forestry we typically work with diametric classes instead of raw diameters. Therefore, we often create diametric classes with a range of 5 or 10 centimeters.

  • diameter: diameter of the tree, typically refering to the diameter at breast height (1.30 meters) expressed in centimeters.

  • h0 (dominant height): the mean height of the 100 thickest trees per hectare (Assman); or the mean height of the 100 tallest trees per hectare (Hart).

  • g (basal area): the basal area of the tree, which is typically expressed by the symbol G. It is expressed as squared meters per hectare ( m2/ha).

  • height: it refers to the total height of the tree in meters.

  • Lorey's height: tree’s mean height weighted by basal area.

  • ntrees: number of trees (typically of the same diameter).

  • species: Latin name of the tree species (e.g. Pinus pinaster).

  • volume: estimated volume of the tree in cubic meters (m3).

Contributing

Contributions to silviculture are highly appreciated! If you have ideas for improvements or new features, feel free to:

  • Open an issue for bugs or feature requests.

  • Submit a pull request for code contributions.

  • Share feedback on usage, examples, or additional functionality.

License

This project is licensed under the GPL-3 License.

Copy Link

Version

Install

install.packages('silviculture')

Monthly Downloads

131

Version

0.2.0

License

GPL (>= 3)

Maintainer

Adrián Cidre González

Last Published

September 27th, 2025

Functions in silviculture (0.2.0)

eq_biomass_dieguez_aranda_2009

Biomass equations for Galician species
inventory_samples

Forest inventory samples
eq_hd_vazquez_veloso_2025

Estimates tree height from DBH
eq_biomass_cudjoe_2024

Biomass equations for 2 species in Castille and León (Spain)
lid_fcov

Calculate Forest Fraction Cover from LiDAR Data
lid_lhdi

LiDAR-derived Height Diversity Index (LHDI)
silv_diametric_class

Classify diameters in classes
calc_n_simple

Calculates number of plots using Student's T
silv_sample_size_stratified

Calculates sample size for a stratified sampling
silv_predict_biomass

Calculate Tree Biomass
silv_predict_height

Estimates tree height from DBH
silv_dominant_height

Calculates the dominant height
silv_sqrmean_diameter

Calculates the quadratic mean diameter (QMD)
silv_spacing_index

Hart or Hart-Becking spacing index
silv_density_ntrees_ha

Calculates number of trees per hectare
silv_density_sdi

Calculates the Stand Density Index
plot

Plot an object
silv_stand_qmean_diameter

Calculates the quadratic mean diameter (QMD)
silv_stand_lorey_height

Calculates Lorey's Height
calc_n_optimal

Calculates number of plots for optimal allocation with constant cost
biomass_models

Biomass models
calc_n_prop

Calculates number of plots for proportional allocation
calc_accumulated_trees

Calculates number of trees until reaching a maximum number of trees
calc_n_cost

Calculates number of plots for optimal allocation with variable cost
calc_dominant_metric

Calculates dominant height or dominant diameter
weighted_sd

Calculates weighted standard deviation
silv_tree_dclass

Classify diameters in classes
silv_stand_basal_area

Calculates Basal Area
silv_tree_basal_area

Calculates Basal Area
silv_basal_area

Calculates Basal Area
eq_biomass_menendez_2022

Biomass equations for young Spanish plantations
silv_lorey_height

Calculates Lorey's Height
eq_biomass_montero_2005

Biomass equations for Spanish species
silv_ntrees_ha

Calculates number of trees per hectare
silv_treatment_thinning

Calculate Forestry Thinning Schemes
silv_stand_dominant_height

Calculates the dominant height
eq_biomass_ruiz_peinado_2012

Biomass equations for Spanish hardwood species
silv_stand_dominant_diameter

Calculates the dominant diameter
silv_summary

Calculates a bunch of forest metrics
silv_density_hart

Hart or Hart-Becking spacing index
eq_biomass_ruiz_peinado_2011

Biomass equations for Spanish softwood species
silv_biomass

Calculate Tree Biomass
silv_sample_size

Calculates sample size for a random sampling inventory
silv_sample_size_simple

Calculates sample size for a simple random sampling (SRS)
weighted_median

Calculates weighted mean
silviculture-package

silviculture: Utility Functions for Forest Inventory and Silviculture
silv_volume

Calculate Tree Volume
silv_tree_volume

Calculate Tree Volume
eq_biomass_manrique_2017

Biomass equations two Quercus species