The function defines stem cycles from output of phase_def and calculates statistics for complete cycles as well as for the phases of contraction, expansion and stem-radius increment.
cycle_stats(dm.gpf, dm.phase, sensor = 1, smooth.param = 1)The function returns a list with:
a data.frame named cycleStats containing the following summary statistics:
dendrometer ID.
cycle number.
cyclic phase (1: contraction, 2: expansion, 3: stem-radius increment, 4: full cycle).
timestamp indicating the beginning of each phase.
timestamp indicating the end of each phase.
phase duration in hours.
phase duration in minutes.
magnitude of stem-size changes in each phase.
minimum stem size within each phase.
maximum stem size within each phase.
a data.frame named cycle.df containing, for all individual records, the following columns:
dendrometer ID.
cycle number.
cyclic phase (1: contraction, 2: expansion, 3: stem-radius increment, 4: full cycle).
a data.frame with either gap-free or gap-filled dendrometer series as produced by fill_gaps.
a data.frame with numbers indicating the different stem-cyclic phases. Output of phase_def.
a numeric specifying the sensor to be used in the function. Defaults to 1 (first column in both data.frames).
a numeric specifying the degree of smoothing. Defaults to 1 (no smoothing).
Olivier Bouriaud, Ernst van der Maaten and Marieke van der Maaten-Theunissen.
The function uses the output of phase_def to define stem cycles and to calculate statistics for all cyclic phases. These statistics include the timing and duration of each phase, as well as information on stem-size changes. The function works for single dendrometer series, which are defined by the argument sensor.
The function includes a smoothing option (argument smooth.param) particularly for noisy datasets in which outliers may under- or overestimate the minimum and maximum stem size within phases and stem cycles. By default, no smoothing is performed.
data(dmCD)
dm.phase <- phase_def(dmCD)
dm.stats <- cycle_stats(dmCD, dm.phase)
Run the code above in your browser using DataLab