dm.na.interpolation {dendRoAnalyst} | R Documentation |
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")
Arguments
df |
dataframe with first column containing date and time in the format |
resolution |
integer, indicating the resolution of dendrometer data in minutes. |
fill |
logical, if |
method |
string, 'spline' for the spline interpolation or 'seasonal' for the seasonal interpolation. |
Value
A dataframe containing the dendrometer data including gaps filled with either NA
or interpolated values.
Examples
library(dendRoAnalyst)
data(nepa17)
gf_nepa17<-dm.na.interpolation(df=nepa17, resolution=60)
head(gf_nepa17,10)