dm.na.interpolation: Detection and interpolation of missing values in dendrometer data.
Description
This function detects gap(s) in time series, inserts the missing rows based on the provided temporal resolution and assings NA values to the corresponding value. If required the NA values can be replaced by spline interpolation using na.spline of the package zoo or seasonal interpolation considering the seasonality of the daily pattern using na.interp of the package forecast.
Usage
dm.na.interpolation(df, resolution, fill = FALSE, method = "spline")
Value
A dataframe containing the dendrometer data including gaps filled with either NA or interpolated values.
Arguments
df
dataframe with first column containing date and time in the format yyyy-mm-dd HH:MM:SS and following columns with dendrometer data for the same temporal resolution and time period.
resolution
integer, indicating the resolution of dendrometer data in minutes.
fill
logical, if TRUE it fills the NA values using spline interpolation. Default is FALSE.
method
string, 'spline' for the spline interpolation or 'seasonal' for the seasonal interpolation.