View source: R/network.interpolation.R
network.interpolation | R Documentation |
A function to interpolate the missing data of a dendrometer with the help of other dendrometers from the same site, provided they have the same measurement period and temporal resolution.
network.interpolation(df, referenceDF, niMethod)
df |
dataframe with first column containing date and time in the format |
referenceDF |
dataframe with other dendrometers to be used as reference for the interpolation. The more dendrometers are included, the more robust will be the interpolation. |
niMethod |
string, either 'linear' or 'proportional' for interpolation method. |
A dataframe with NA
values replaced by interpolated data.
library(dendRoAnalyst) data("gf_nepa17") df1<-gf_nepa17 # Creating an artificial reference dataset. df2<-cbind(gf_nepa17,gf_nepa17[,2:3],gf_nepa17[,2:3]) # Creating gaps in dataset by replacing some of the reading with NA in dataset. df1[40:50,3]<-NA # Using proportional interpolation method. df1_NI<-network.interpolation(df=df1, referenceDF=df2, niMethod='proportional') head(df1_NI,10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.