Learn R Programming

medfate (version 5.0.0)

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

Value

An empty forest object.

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

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

Author

Miquel De Cáceres Ainsa, CREAF

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.

See Also

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

Examples

Run this code
# 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)

Run the code above in your browser using DataLab