comp_module: General compatibility module between tree-level and...

Description Usage Arguments Value Author(s) Examples

View source: R/comp_module.R

Description

General compatibility module that takes tree-level simulations and makes a compatibility with the stand-level simulations. Two compatibility methods are available PY: proportional compatibility, and PG: proportional growth compatibility. The input object (tree or stand) needs to have the option requesting compatibility (i.e, type='comp') together with the method: comptype ('PY' or 'PG') (default = 'PY')

Usage

1
comp_module(sim.tree = NA, sim.stand = NA)

Arguments

sim.tree

a simulated tree object from tree_simulator

sim.stand

a simulated stand object from stand_simulator

Value

A list of elements and parameters with updated tables with compatibility. Outputs are the same as input_module object but these are updated for simulations.

Author(s)

S. Palmas, S.A. Gezan and P. Moreno

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Example 1: Proportional yield (PY)
# Tree information
tree.list <- plot_example
plot.tree <- input_module(ZONE=2, AD=28, HD=23.5, AF=45, type='tree', area=500,
                          tree.list=tree.list, ddiam=FALSE)
sim.tree <- core_module(input=plot.tree)
head(sim.tree$tree.list)
# Stand information from plot.tree$sp.table
BA <- c(1.086,38.915,0.0,0.313)
N <- c(60,780,0,80)
plot.stand <- input_module(ZONE=2, AD=28, HD=23.5, AF=45, N=N, BA=BA,
                           type='stand', ddiam=FALSE)
sim.stand <- core_module(input=plot.stand)
# Summary tree and stand by specie table
sim.tree$sp.table
sim.stand$sp.table
# Requesting Compatibility, for method 'PY'
sim.tree$comptype = 'PY'
sim.tree$type = 'comp'
sim.comp <- comp_module(sim.tree=sim.tree, sim.stand=sim.stand)
sim.comp$sp.table

# Example 2: Proportional growth (PG)
sim.tree$comptype = 'PG'
sim.tree$type = 'comp'
sim.comp <- comp_module(sim.tree=sim.tree, sim.stand=sim.stand)
sim.comp$sp.table

sgezan/Nothopack documentation built on April 25, 2021, 8:03 a.m.