climate_seg: Segmenting climate and environmental data
Description
The function calculates means or sums, or extracts minimum or maximum values of environmental parameters for stem-cyclic phases as defined using cycle_stats.
Usage
climate_seg(env.data, dm.stats, value = c("mean", "min",
"max", "sum"))
Value
The function returns a data.frame with segmented environmental data. The data.frame contains the following columns:
columns with segmented environmental data (mean, min, max or sum).
Arguments
env.data
a data.frame with with a timestamp (%Y-%m-%d %H:%M:%S format) as row names, and a certain climate parameter (e.g., temperature or precipitation) in columns.
dm.stats
a list as produced by cycle_stats.
value
a character string of "mean", "min", "max" or "sum", specifying whether means (e.g., for temperature) or sums (e.g., for precipitation) should be calculated, or minimum or maximum values should be extracted. Defaults to "mean". Argument matching is performed.
Details
The function segments environmental parameters according to the stem-cyclic phases as defined using cycle_stats. Means, sums, and minimum and maximum values can be calculated or extracted.
env.data should cover at least the same period as the dendrometer data used to define the cyclic phases, and should have the same (or a higher) temporal resolution.