emptyforest: Creation of an empty forest

View source: R/emptyforest.R

emptyforestR Documentation

Creation of an empty forest

Description

Creates an empty forest object.

Usage

emptyforest(
  ntree = 0,
  nshrub = 0,
  nherb = 0,
  nseedling = 0,
  nseed = 0,
  nsnag = 0,
  nlitter = 0,
  addcolumns = NULL,
  SOC = FALSE
)

Arguments

ntree, nshrub, nherb

Number of tree, shrub and herb cohorts, respectively.

nseedling

Number of species in the seedling bank.

nseed

Number of species in the seed bank.

nsnag

Number of snag (dead standing) cohorts.

nlitter

Number of items in the litter compartment.

addcolumns

A character vector with additional columns. Currently allowed are (see forest):

  • Z100: A numeric vector with maximum rooting depth in mm.

  • LAI: Leaf area index (m2/m2).

  • LAIMistletoe: Leaf area index (m2/m2) of mistletoes.

  • FoliarBiomass: Standing dry biomass of leaves (kg/m2).

  • FuelLoading: Fine fuel loading (kg/m2).

  • CrownRatio: The ratio between crown length and total height (between 0 and 1)

  • Age: A numeric vector indicating age of cohorts in years.

  • ObsID A character vector to label specific cohorts in simulations of forest dynamics.

SOC

A boolean flag to initialize SOC data (see forest).

Details

List elements treeData and shrubData are always created, regardless of the number of cohorts. In contrast, list elements herbData, seedBank and seedlingBank are only created if nherb, nseed and nseedling are non-zero, respectively.

Value

An empty forest object.

Author(s)

Miquel De Cáceres Ainsa, CREAF

See Also

forest, tree2forest, summary.forest, forest_mapWoodyTables, forest_mergeTrees, plot.forest

Examples

# Initializes forest with 2 tree cohorts
emptyforest(ntree = 2)

# Initializes forest with 2 tree cohorts and 1 shrub cohort
emptyforest(ntree = 2, nshrub = 1)

# Initializes with extra column for leaf area index (LAI)
emptyforest(ntree = 2, nshrub = 1, addcolumns = "LAI")

# Initializes forest with 2 tree cohorts, 1 shrub cohort and 1 herbaceous cohort
emptyforest(ntree = 2, nshrub = 1, nherb = 1)

medfate documentation built on Sept. 3, 2026, 9:06 a.m.