correct_recruits.Rd
correct recruits spots "ovegrown recruits", i.e. trees that were first registered with an abnormally high DBH, given the protocol's minimum censusing DBH and the upper threshold over which tree growth is considered abnormal. In other terms, trees that were certainly there and over minimum DBH in some censuses before they were first registered. The function then reconstitutes the growth trajectory of these tree before their first register and thus adds the corresponding lines to the inventory, flagging these lines with a logical field named "corrected_recruit".
correct_recruits( data, dbh_min = 10, positive_growth_threshold = 5, time_col = getOption("time_col"), id_col = getOption("id_col"), plot_col = getOption("plot_col"), size_corr_col = "size_corr", status_corr_col = "status_corr", measure_type = getOption("measure_type"), invariant_columns = c("Forest", "Family", "Genus", "Species", "binomial_name"), byplot = TRUE, correct_status = FALSE )
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. |
---|---|
dbh_min | scalar integer or numeric, indicating the minimum DIAMETER (in centimeters) at the default measurement height from which trees are recorded. Defaults to 10 cm. |
positive_growth_threshold | positive numeric or integer, threshold over which an annual DIAMETER growth is considered abnormal (in cm). Defaults to 5 cm. |
time_col | character, name of the column containing census years. |
id_col | character, name of the column containing trees unique IDs. |
plot_col | character, name of the column containing plot indices or names. |
size_corr_col | Character, the name of the column containing corrected size measurements. |
status_corr_col | Character, the name of the column containing corrected tree life status. |
measure_type | character, partially matching “Circumference” or “Diameter”, indicating what is the type of the measurements. |
invariant_columns | character vector, containing the name of the columns for which value remain constant for a given tree (for example species name or coordinates). When a row is added by the function correct_alive, values for invariant columns are taken from the value for other censuses. Defaults to null |
byplot | logical, indicating whether the function has to process the data by plot (TRUE)or for the whole dataset (FALSE). |
correct_status | Logical, indicating whether the life status has to be corrected beforhand or not. |
A forest inventory with added lines, which correspond to overgrown recruits estimated trajectories. To use with caution in certain analyses, e.g. biomass monitoring.
If a tree is recruited (first registered after the initial census) with an excessive size, its size trajectory is reconstituted using a linear model on existing values, for census years corresponding to the plot.
Only the estimated sizes that are still over the minimum DBH censusing limit are kept in the output.
If the tree size never varied in the registered measurement, the same value is kept for censuses before the tree's first registering.
Abnormal size at recruitment is defined according to the study's minimum censusing DBH (minimum_dbh) and a "tolerated growth threshold" (positive_growth_threshold), estimated by local expertise or other means, and over which annual growth is considered abnormal/suspicious. A recruit is considered overgrown if the size at recruitment time exceeds minimum_dbh+(recruitment_time - previous_census)*positive_growth_threshold.
## From a bare dataset - better using after correct_alive and correct_size data("example_size_corr") cors <- suppressWarnings(correct_recruits(example_size_corr, dbh_min = 10, positive_growth_threshold = 5, time_col = "CensusYear", id_col = "idTree", plot_col = "Plot", size_corr_col = "size_corr", status_corr_col = "status_corr", measure_type = "circumference", invariant_columns = c("Forest","Family","Genus","Species","binomial_name"), byplot = TRUE, correct_status = FALSE))#> | | | 0% | |=================================== | 50% | |======================================================================| 100%#> 'data.frame': 25684 obs. of 16 variables: #> $ Forest : chr "Paracou:P6" "Paracou:P6" "Paracou:P6" "Paracou:P6" ... #> $ Plot : chr "1" "1" "1" "1" ... #> $ idTree : int 100621 100621 100621 100621 100621 100621 100621 100621 100621 100621 ... #> $ Family : chr "Euphorbiaceae" "Euphorbiaceae" "Euphorbiaceae" "Euphorbiaceae" ... #> $ Genus : chr "Sandwithia" "Sandwithia" "Sandwithia" "Sandwithia" ... #> $ Species : chr "guyanensis" "guyanensis" "guyanensis" "guyanensis" ... #> $ CensusYear : int 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 ... #> $ CodeAlive : logi TRUE TRUE TRUE TRUE TRUE TRUE ... #> $ CodeMeas : int 0 0 0 0 0 0 0 0 0 0 ... #> $ Circ : num 40 40 40 40.5 40.5 41.5 40.5 40.5 40.5 41 ... #> $ binomial_name : chr "Sandwithia_guyanensis" "Sandwithia_guyanensis" "Sandwithia_guyanensis" "Sandwithia_guyanensis" ... #> $ POM : num 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 ... #> $ status_corr : num 1 1 1 1 1 1 1 1 1 1 ... #> $ code_corr : Factor w/ 8 levels "0","POM","def_decr_R_recent",..: 1 1 1 1 1 1 1 1 1 1 ... #> $ size_corr : num 40 40 40 40.5 40.5 41.5 40.5 40.5 40.5 41 ... #> $ corrected_recruit: logi FALSE FALSE FALSE FALSE FALSE FALSE ...