twd.maxima: Locating the maxima of TWD periods

View source: R/twd.maxima.R

twd.maximaR Documentation

Locating the maxima of TWD periods

Description

This function detects the TWD phases, including their beginning (TWDb), using the phase.zg function. Then it calculates the number, time of occurance (Tm) and value of every local maximum within each TWD phase. In addition it calculates the time difference between 'TWDb' and each 'Tm' within each TWD phase.

Usage

twd.maxima(df, TreeNum, smoothing = 5, showPlot = T, days = c(150, 160), ...)

Arguments

df

dataframe with first column containing date and time in the format yyyy-mm-dd HH:MM:SS. It should contain data with constant temporal resolution for best results.

TreeNum

numerical value indicating the tree to be analysed. E.g. '1' refers to the first dendrometer data column in df.

smoothing

numerical value from 1 to 12 which indicates the length of the smoothing spline, i.e. 1 = 1 hour and 12 = 12 hours. Default is 5.

showPlot

logical, if TRUE, it generates a plot. Default is TRUE.

days

array with initial and final day for plotting. E.g. c(a,b), where a=initial date and b=final date. Default is c(150,160).

...

additional graphical parameter incuded in phase.zg.

Value

A dataframe with statistics of maxima in each TWD phase.

Examples

library(dendRoAnalyst)
data(gf_nepa17)
df1=gf_nepa17[2500:3500,]
twd_max<-twd.maxima(df=df1, TreeNum=2, showPlot=FALSE)
head(twd_max,10)


dendRoAnalyst documentation built on Nov. 16, 2022, 9:07 a.m.