grow.dbhinc.hgtinc: Growth and Height Increment Function Wrapper

Description Usage Arguments Details Value Author(s) Examples

View source: R/grow.dbhinc.hgtinc.R

Description

A growth and height increment function wrapper that can be used with or without a height increment function.

Usage

1
grow.dbhinc.hgtinc(tr, fl, common.vars, this.period, functions, ...)

Arguments

tr

A trList class object.

fl

A list describing the plot data.

common.vars

A list with at least variables spp (species classification in categories: spruce, pine, birch and other), and SBA.m2.ha.

this.period

The period for which to calculate growth.

functions

A list defining the functions to be used in sitree.

...

Further arguments to be passed to DBH increment and height increment functions.

Details

A growth function should calculate both dbh and height increment. This function calls two functions, defined in functions as fn.dbh.inc and fn.hgt.inc to estimate those.

Value

A data frame with two elements dbh.inc.mm DBH increment in mm hgt.inc.dm Height increment in dm

Author(s)

Clara Anton Fernandez [email protected]

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
foo.matrix <-  matrix(0, nrow = length(tr$dbh), ncol = (5 +1))
colnames(foo.matrix) <- paste("t", 0:5, sep = "")
foo.dbh <- foo.height <- foo.matrix
foo.dbh[,1] <- tr$dbh
foo.height[,1] <- tr$height

trl <- list(
  plot.id  = tr$plot.id,
  treeid    = tr$treeid,
  dbh.mm    = foo.dbh,
  height.dm = foo.height,
  yrs.sim   = rep(0, nrow(tr)),
  tree.sp   = factor(tr$tree.sp)
)
tr.i <- trList$new(data = trl, nperiods = as.integer(5))

common.vars <-  prep.common.vars.fun(
  tr = tr.i,
  fl = fl,
  i.period       = 0,
  this.period    = "t0",
  common.vars    = "NULL",
  vars.required  = c("spp", "SBA.m2.ha", "QMD.cm"),
  period.length = 5,
  species.spruce = c(1, 2, 3),
  species.pine = c(10, 11, 20, 21, 29),
  species.harw = c(30, 31)
)


grow.dbhinc.hgtinc (tr = tr.i,
                    fl = fl,
                    common.vars = common.vars$res,
                    this.period = "t0",
                    functions = list(
                        fn.growth     = 'grow.dbhinc.hgtinc',
                        fn.dbh.inc = "dbhi.BN2009",
                        fn.hgt.inc =  "height.korf", 
                        fn.mort       = 'mort.B2007',
                        fn.recr       = 'recr.BBG2008',
                        fn.management = 'management.prob',
                        fn.tree.removal = 'mng.tree.removal',
                        fn.modif      = NULL, #'ext.modif.fun',
                        fn.prep.common.vars = 'prep.common.vars.fun'
                    ),
                    species.spruce = c(1, 2, 3),
                    species.pine =  c(10, 11, 20, 21, 29),
                    species.harw =  c(30, 31)
                    )

sitree documentation built on June 1, 2018, 5:06 p.m.