View source: R/cor_mat_overlap.R
cor_mat_overlap | R Documentation |
Function that creates a Pearson correlation matrix of two rwl objects compared. If the same rwl-object is passed to the function, the correlation between all series is calculated. In addition, the number of overlapping tree-rings is part of the output. The results can be used to calculate the Students' t value
cor_mat_overlap(x, y, minoverlap)
x |
rwl object of tree-ring series |
y |
rwl object of tree-ring series |
minoverlap |
the correlation will only be calculated if the number of overlapping tree-rings is equal or larger than this value |
The function is an adaptation of the function cor.with.limit.R() from https://github.com/AndyBunn/dplR/blob/master/R/rwi.stats.running.R. The new function is optimized and also outputs the number of overlapping rings.
a list with two matrices: one with the correlation values and one with the number of overlapping tree rings for each correlation value. The matrices have row names and column names of the compared tree-ring curves
Andy Bunn
Ronald Visser
rwl_object1 <- hol_rom
rwl_object2 <- hol_rom
cor_mat_overlap(rwl_object1, rwl_object2, 50)
cor_mat_overlap(rwl_object1, rwl_object1, 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.