compute_rates: Title

Description Usage Arguments Value Examples

View source: R/compute_rates.R

Description

Title

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
compute_rates(
  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

data.frame, containing forest inventories in the form of a long-format time series - one line corresponds to a measurement for one individual at a given census time.

status_col

character, name of the column corresponding to tree status: 0/FALSE for dead, 1/TRUE for alive.

time_col

character, name of the column containing census years.

id_col

character, name of the column containing trees unique IDs.

dead_confirmation_censuses

integer, defaults to 2: number of consecutive censuses for which a tree is unseen that are needed to consider the tree as dead. NB: for the trees unseen during the dead_confirmation_censuses -1 last inventories, the status cannot be corrected, thus mortality rates should not be calculated for these censuses.

byplot

logical, indicating whether the function has to process the data by plot (TRUE)or for the whole dataset (FALSE).

plot_col

character, name of the column containing plot indices or names.

corrected

Logical, indicates whether the dataset has been corrected (for tree status errors) beforehand. If TRUE, triggers correct_alive, defaults to TRUE.

Value

a data.frame that contains recruitment and mortality rates, in the same format as the outputs of compute_mortality and compute_recruitment

Examples

1
2
3

EcoFoG/ForestData documentation built on Jan. 20, 2021, 10:04 a.m.