mng.tree.removal: Function to remove trees

Description Usage Arguments Value Author(s) Examples

View source: R/mng.tree.removal.R

Description

Define how trees are going to be removed in plots with some sort of management that involves removal (e.g final felling, thinning).

Usage

1
mng.tree.removal(tr, fl, common.vars, this.period, next.period, ...)

Arguments

tr

A trList class object.

fl

A list describing the plot data.

common.vars

A list with at least variable vol.wo.tr.m3.ha

this.period

The period for which to calculate final felling and thinning probability.

next.period

The next period to the one for which final felling and thinning probability are to be calculated.

...

Value

Returns a TRUE/FALSE vector of length equal to the number of trees in tr.

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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("vol.wo.tr.m3.ha", "vuprha.m3.h"),
  period.length = 5,
  species.spruce = c(1, 2, 3),
  species.pine = c(10, 11, 20, 21, 29),
  species.harw = c(30, 31)
)

fl$management <- data.frame(matrix(NA, ncol = tr.i$nperiods,
                                   nrow = length(fl$plot.id)))
names(fl$management) <- paste0("t", 1:tr.i$nperiods)

management <- management.prob(tr.i,
                fl,
                fun.final.felling = "harv.prob",
                fun.thinning = "thin.prob",
                common.vars = common.vars$res,
                this.period = "t0",
                next.period = "t1")
fl$management[, "t1"] <- management$management
remove.tree <- mng.tree.removal(tr = tr.i,
                                fl = fl,
                                common.vars = common.vars$res,
                                this.period = "t0",
                                next.period = "t1",
                                per.vol.harv =  0.83 )
sum(remove.tree)

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