Skip to contents

Creates an empty forest object.

Usage

emptyforest(ntree = 0, nshrub = 0, nseedling = 0, nseed = 0, addcolumns = NULL)

Arguments

ntree, nshrub

Number of tree and shrub cohorts, respectively.

nseedling

Number of species in the seedling bank.

nseed

Number of species in the seed bank.

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.

Value

An empty forest object.

Details

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

Author

Miquel De Cáceres Ainsa, CREAF

Examples

# Initializes forest with 2 tree cohorts
emptyforest(ntree = 2)
#> $treeData
#>   Species DBH Height  N Z50 Z95
#> 1    <NA>  NA     NA NA  NA  NA
#> 2    <NA>  NA     NA NA  NA  NA
#> 
#> $shrubData
#> [1] Species Height  Cover   Z50     Z95    
#> <0 rows> (or 0-length row.names)
#> 
#> attr(,"class")
#> [1] "forest" "list"  

# Initializes forest with 2 tree cohorts and 1 shrub cohort
emptyforest(ntree = 2, nshrub = 1)
#> $treeData
#>   Species DBH Height  N Z50 Z95
#> 1    <NA>  NA     NA NA  NA  NA
#> 2    <NA>  NA     NA NA  NA  NA
#> 
#> $shrubData
#>   Species Height Cover Z50 Z95
#> 1    <NA>     NA    NA  NA  NA
#> 
#> attr(,"class")
#> [1] "forest" "list"  

# Initializes with extra column for leaf area index (LAI)
emptyforest(ntree = 2, nshrub = 1, addcolumns = "LAI")
#> $treeData
#>   Species DBH Height  N Z50 Z95 LAI
#> 1    <NA>  NA     NA NA  NA  NA  NA
#> 2    <NA>  NA     NA NA  NA  NA  NA
#> 
#> $shrubData
#>   Species Height Cover Z50 Z95 LAI
#> 1    <NA>     NA    NA  NA  NA  NA
#> 
#> attr(,"class")
#> [1] "forest" "list"  

# Initializes forest with 2 tree cohorts, 1 shrub cohort and 1 seedling element
emptyforest(ntree = 2, nshrub = 1, nseedling = 1)
#> $treeData
#>   Species DBH Height  N Z50 Z95
#> 1    <NA>  NA     NA NA  NA  NA
#> 2    <NA>  NA     NA NA  NA  NA
#> 
#> $shrubData
#>   Species Height Cover Z50 Z95
#> 1    <NA>     NA    NA  NA  NA
#> 
#> $seedlingBank
#>   Species Percent Age Z50 Z95
#> 1    <NA>      NA  NA  NA  NA
#> 
#> attr(,"class")
#> [1] "forest" "list"