compute_growth: Title

Description Usage Arguments Value Examples

View source: R/compute_growth_fin.R

Description

Title

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
compute_growth(
  data,
  size_col = "Circ",
  measure_type = "cir",
  status_col = "CodeAlive",
  id_col = "idTree",
  time_col = "CensusYear",
  what_output = "annual",
  aggregate = FALSE,
  by = c("Plot", "SubPlot"),
  stat = "mean",
  percentiles = c(5, 95),
  ...
)

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.

size_col

character, name of the column corresponding to tree size (circumference or diameter) measurements .

measure_type

character, partially matching “Circumference” or “Diameter”, indicating what is the type of the measurements.

status_col

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

id_col

character, name of the column containing trees unique IDs.

time_col

character, name of the column containing census years.

what_output

character, one of 'annual' or 'absolute'. Defines if the output growth rates must be annualised growth rates or absolute between-census deltas (respectively).

aggregate

logical, defining if the growthrates must be aggregated (TRUE) according to specified variables (argument 'by') with calculated values 'stat' and quantiles ('percentiles'); or returned for each individual (FALSE).

by

character vector, names of the grouping variables used to aggregate values.

stat

character, one of the following: 'mean','sum','median'. Statistics used if values are aggregated.

percentiles

integer vector between 0 and 100. Percentiles are calculated if values are aggegated.

...

Optional arguments for advanced use. ask_stat: logical, defaults to TRUE, if set to FALSE, try directly to use the specified 'stat' for aggregation without checking it -thus, not failproof-.verbose: logical, defaults to TRUE, if set to FALSE or equivalent, show less messages.

Value

Either the input data.frame with individual-level calculated growth rates, or a data.frame with grouping variables and required statistics.

Examples

1
2
3

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