mov.cor.dm {dendRoAnalyst}R Documentation

Calculating running correlation between dendrometer data and daily climate.

Description

This function calculates running correlation between dendrometer series and provided climate variables. Users can choose methods such as pearson, kendall and spearman, see cor.test for further information.

Usage

mov.cor.dm(df, Clim, TreeNum, win_size, cor_method = "pearson")

Arguments

df

dataframe with first column containing date and time in the format yyyy-mm-dd HH:MM:SS and the dendrometer data in following columns.

Clim

dataframe with the first column containing Date in yyyy-mm-dd and second column containing corresponding climate data.

TreeNum

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

win_size

numerical, the running days windows of which the correlation is to be calculated. The minimum value is 18.

cor_method

string, method to be applied during correlation calculation. One of the following: pearson, kendall and spearman

Value

A list of dataframes containing the correlation and significant value between dendrometer series and provided climates.

Examples

library(dendRoAnalyst)
data(gf_nepa17)
data(ktm_rain17)
out_corr<-mov.cor.dm(df=gf_nepa17, Clim=ktm_rain17, TreeNum=1, win_size=21)
head(out_corr[1],10)

[Package dendRoAnalyst version 0.1.5 Index]