This function computes recruitment in forest inventories according to plot

compute_recruitment(
  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
)

Arguments

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

Value

A data.frame with absolute and annual recruitment rates by plot and census interval.

Examples

if (FALSE) { data("example_census") suppressWarnings(compute_recruitment(example_census, status_col="status_corr", time_col="CensusYear", id_col="idTree", dead_confirmation_censuses=2, byplot = TRUE, plot_col = "Plot", corrected = TRUE)) }