recover.last.measurement: Recover dbh and height at time of death

Description Usage Arguments Details Value Author(s) Examples

View source: R/recover.last.measurement.R

Description

Removes all dbh and height data that corresponds to the live of the tree, and adds the dbh and height at time of death to the dbh.mm and height.dm in the data field.

Usage

1

Arguments

tr.list.dead

a trListDead object

Details

It removes all dbh and height data from the data field, adds the dbh and height at time of death, and converts any potential NAs created in the process to 0.

Value

It returns the same object (a trListDead object) with all data on dbh and height removed. For each tree there is only one observation of dbh and height in the data field, the estimated dbh and height at time of death.

Author(s)

Clara Anton Fernandez caf@nibio.no

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
set.seed(2017)
res <- sitree (tree.df   = tr,
                stand.df  = fl,
                functions = list(
                    fn.growth     = 'grow.dbhinc.hgtinc',
                    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'
                ),
                n.periods = 5,
                period.length = 5,
                mng.options = NA,
                print.comments = FALSE,
		fn.dbh.inc = "dbhi.BN2009",
                fn.hgt.inc =  "height.korf", 
                species.spruce = c(1, 2, 3),
                species.pine = c(10, 11, 20, 21, 29),
                species.harw = c(30, 31),
                fun.final.felling = "harv.prob",
                fun.thinning      = "thin.prob",
                'BN2009',
                'BBG2008', 'SBA.m2.ha', 'spp','pr.spru.ba', 'QMD.cm',
                per.vol.harv = 0.83
                )
dead <- recover.last.measurement(res$dead)
str(dead)
removed <- recover.last.measurement(res$removed)
str(removed)

cantonfe/sitree documentation built on Dec. 26, 2021, 8:55 a.m.