climate_seg {dendrometeR} | R Documentation |
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"))
Arguments
env.data |
a |
dm.stats |
a |
value |
a |
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.
Value
The function returns a data.frame
with segmented environmental data. The data.frame
contains the following columns:
dmID |
dendrometer ID. |
cycle |
cycle number. |
phase |
cyclic phase (1: contraction, 2: expansion, 3: stem-radius increment, 4: full cycle). |
begin |
timestamp indicating the beginning of each phase. |
end |
timestamp indicating the end of each phase. |
... |
columns with segmented environmental data (mean, min, max or sum). |
Examples
data(dmED)
dm.gpf <- fill_gaps(dmED)
dm.phase <- phase_def(dm.gpf)
dm.stats <- cycle_stats(dm.gpf, dm.phase)
data(envED)
clim.phase <- climate_seg(envED, dm.stats, value = "mean")