compute_mortality.Rd
This function computes mortality in forest inventories according to plot if there are several
compute_mortality( data, status_col = "status_corr", time_col = ifelse(is.null(getOption("time_col")), "CensusYear", getOption("time_col")), id_col = ifelse(is.null(getOption("id_col")), "idTree", getOption("id_col")), dead_confirmation_censuses = 2, byplot = TRUE, plot_col = ifelse(is.null(getOption("plot_col")), "Plot", getOption("plot_col")), corrected = TRUE )
data | A data.frame containing a time-series tree-wise forest inventory -i.e. every line is a single tree measurement for a single year. |
---|---|
status_col | Character. The name of the column containing tree vital status - 0=dead; 1=alive. |
time_col | Character. The name of the column containing census year |
id_col | Character. The name of the column containing trees unique ids |
dead_confirmation_censuses | Integer, defaults to 2. This is the number of censuses needed to state that a tree is considered dead, if unseen. In Paracou, we use the rule-of-thumb that if a tree is unseen twice, its probability to be actually dead is close to 1. The choice of this value involves that trees unseen during the X-1 last inventories can not be corrected for death, and thus mortality rates should not be calculated for these censuses. |
byplot | Logical. If there are several plots in your dataset, the correction is performed by plot, in case these would not be censuses the same years or with the same frequencies one another. |
plot_col | Character. The name of the column containing the plots indices. |
corrected | Logical. Indicates whether the dataset has been corrected for errors in tree life status; if not it will be corrected beforehand using correct_alive function |
A data.frame with absolute and annual mortality rates by plot and census interval.
data("example_status_corr") suppressWarnings(compute_mortality(example_status_corr, status_col="status_corr", time_col="CensusYear", id_col="idTree", dead_confirmation_censuses=2, byplot = TRUE, plot_col = "Plot", corrected = TRUE))#> interval time annual_deathrate plot #> 1 1984_1985 1985 0.007157464 1 #> 2 1985_1986 1986 0.009045226 1 #> 3 1986_1987 1987 0.012121212 1 #> 4 1987_1988 1988 0.008097166 1 #> 5 1988_1989 1989 0.011156187 1 #> 6 1989_1990 1990 0.012219959 1 #> 7 1990_1991 1991 0.005122951 1 #> 8 1991_1992 1992 0.007092199 1 #> 9 1992_1993 1993 0.006097561 1 #> 10 1993_1994 1994 0.007099391 1 #> 11 1994_1995 1995 0.009174312 1 #> 12 1995_1997 1997 0.007146595 1 #> 13 1997_1999 1999 0.010739253 1 #> 14 1999_2001 2001 0.011637128 1 #> 15 1985_1987 1987 0.011976480 3 #> 16 1987_1989 1989 0.012089801 3 #> 17 1989_1991 1991 0.010061151 3 #> 18 1991_1993 1993 0.007901098 3 #> 19 1993_1995 1995 0.008884420 3 #> 20 1995_1997 1997 0.022355139 3 #> 21 1997_1999 1999 0.009852457 3 #> 22 1999_2001 2001 0.010526609 3