Description Usage Arguments Value Examples
correct_all performs corrections for tree life status, overgrown recruits cases, size measurement errors and POM changes, by calling correct_alive, correct_size and correct_recruits in this order.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | correct_all(
data,
id_col = getOption("id_col"),
time_col = getOption("time_col"),
status_col = getOption("status_col"),
plot_col = getOption("plot_col"),
byplot = TRUE,
dead_confirmation_censuses = 2,
use_size = FALSE,
invariant_columns = c("Genus", "Species", "binomial_name", "Forest", "Family"),
size_col = getOption("size_col"),
species_col = "binomial_name",
POM_col = getOption("POM_col"),
measure_type = getOption("measure_type"),
positive_growth_threshold = 5,
negative_growth_threshold = -2,
default_POM = 1.3,
pioneers = c("Cecropia", "Pourouma"),
pioneers_treshold = 7.5,
dbh_min = 10
)
|
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. |
id_col |
character, name of the column containing trees unique IDs. |
time_col |
character, name of the column containing census years. |
status_col |
character, name of the column corresponding to tree status: 0/FALSE for dead, 1/TRUE for alive. |
plot_col |
character, name of the column containing plot indices or names. |
byplot |
logical, indicating whether the function has to process the data by plot (TRUE)or for the whole dataset (FALSE). |
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. |
use_size |
character, defaults to FALSE. Optional argument specifying whether to use measurement column (circumference or diameter) to create a vital status field in case it does not already exist. See Details. |
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 |
size_col |
character, name of the column corresponding to tree size (circumference or diameter) measurements . |
species_col |
character, name of th column containing full species names (or other taxonomic identification) |
POM_col |
character, name of the column corresponding the Point Of Measurement (POM). |
measure_type |
character, partially matching “Circumference” or “Diameter”, indicating what is the type of the measurements. |
positive_growth_threshold |
positive numeric or integer, threshold over which an annual DIAMETER growth is considered abnormal (in cm). Defaults to 5 cm. |
negative_growth_threshold |
negative numeric or integer, threshold under which an absolute DIAMETER difference is considered abnormal. To be given in centimeters. Defaults to -2 cm. Note that this threshold is applied between two consecutive censuses, regardless of the time between them, as it assumes that a tree diameter cannot decrease more than this value, even over a long period. |
default_POM |
scalar numeric, default POM used in the dataset, in the same unit as the POM. When the value in POM_col is different from default_POM, the corrected size is given at default_POM . It defaults to 1.3 meters-according to current practice of measurement of diameter at breast height (DBH). |
pioneers |
character vector containing full species name (or other taxonomic identification)for which a specific positive growth threshold (used for instance for fast growing species for which the threshold to detect an abnormal growth is high). |
pioneers_treshold |
Positive DIAMETER growth limit to apply to pioneer species (specified in 'pioneers'), similar to . Expressed in centimeters. Defaults to 7.5 cm |
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. |
A data.frame with additional columns: status_corr and size_corr for corrected tree vital status and size, code_corr for correction tag and types.
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 49 50 51 | data(example_census)
# Short version: parameters specified using prepare_forestdata and default values
prepare_forestdata(example_census,
plot_col="Plot",
id_col="idTree",
time_col="CensusYear",
status_col = "CodeAlive",
size_col="Circ",
measure_type = "C",
POM_col = "POM")
all_cors <- suppressWarnings(correct_all(example_census,
invariant_columns = c("Genus",
"Species",
"binomial_name",
"Forest",
"Family"),
species_col = "binomial_name",#tag pioneer
measure_type = getOption("measure_type"),
pioneers = c("Cecropia","Pourouma"),#tag pioneer
pioneers_treshold = 7.5))
# Full call:
all_cors <- suppressWarnings(correct_all(example_census,
id_col = "idTree",
time_col = "CensusYear",
status_col = "CodeAlive",
plot_col = "Plot",
byplot = TRUE,
dead_confirmation_censuses = 2,
use_size = FALSE,
invariant_columns = c("Genus",
"Species",
"binomial_name",
"Forest",
"Family"),
size_col = "Circ",
species_col = "binomial_name",#tag pioneer
POM_col = "POM",
measure_type = "C",
positive_growth_threshold = 5,
negative_growth_threshold = -2,
default_POM = 1.3,
pioneers = c("Cecropia","Pourouma"),#tag pioneer
pioneers_treshold = 7.5,
dbh_min = 10))
str(all_cors)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.