daily.data: Daily statistics of dendrometer data

View source: R/daily.data.R

daily.dataR Documentation

Daily statistics of dendrometer data

Description

Computes daily statistics from high-frequency dendrometer time series. For each day, it extracts the minimum and maximum values, their times of occurrence, daily mean and median, daily amplitude, the signed lag between the time of maximum and minimum, the day-to-day change in the daily maximum, and a daily status indicating whether the day is growing, shrinking, or stable relative to the previous day.

Usage

daily.data(df, TreeNum)

Arguments

df

A data frame with the first column containing date-time stamps convertible to POSIXct and subsequent columns containing dendrometer measurements.

TreeNum

Integer. The index of the tree (column) to analyze. TreeNum = 1 refers to the first dendrometer column after the time column.

Details

The function requires a data frame with a time column in the first column and one or more dendrometer series in the following columns. The user selects the series using TreeNum.

The returned object has class "daily_output", so it can be plotted directly with plot().

The column Max_diff is computed as:

Max\_diff_t = Max_t - Max_{t-1}

The column Day_status is derived from Max_diff:

  • "growing" if Max_diff > 0

  • "shrinking" if Max_diff < 0

  • "stable" if Max_diff = 0

The first day has NA for Max_diff and Day_status.

Value

A tibble of class "daily_output" containing:

DATE

Calendar date.

Min

Daily minimum value.

Time_min

Time of day of minimum value.

Max

Daily maximum value.

Time_max

Time of day of maximum value.

mean

Daily mean value.

median

Daily median value.

amplitude

Daily amplitude = Max - Min.

Time_min_h

Time of minimum expressed in decimal hours.

Time_max_h

Time of maximum expressed in decimal hours.

lag_h

Signed difference in hours: Time_max_h - Time_min_h.

Remarks

"*" if Time_max > Time_min, otherwise "".

Max_diff

Difference between today's maximum and the previous day's maximum.

Day_status

"growing", "shrinking", "stable", or NA.

Note

The object returned by daily.data() can be plotted using plot() because it is assigned class "daily_output".

References

King G, Fonti P, Nievergelt D, Büntgen U, Frank D (2013) Climatic drivers of hourly to yearly tree radius variations along a 6°C natural warming gradient. Agricultural and Forest Meteorology 168:36–46. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.agrformet.2012.08.002")}

Examples


data(nepa17)
daily_stats <- daily.data(df = nepa17[1:1000, ], TreeNum = 1)
head(daily_stats, 10)



dendRoAnalyst documentation built on May 20, 2026, 5:07 p.m.