xdate.floater {dplR}R Documentation

Crossdate an undated series

Description

Pulls an undated series through a dated rwl file in order to try to establish dates

Usage

xdate.floater(rwl, series, series.name = "Unk", min.overlap = 50, n = NULL,
             prewhiten = TRUE, biweight = TRUE,
             method = c("spearman", "pearson","kendall"),
             make.plot = TRUE,return.rwl = FALSE, verbose = TRUE)

Arguments

rwl

a data.frame with series as columns and years as rows such as that produced by read.rwl.

series

a data.frame with series as columns and years as rows such as that produced by read.rwl.

series.name

a character giving a name for the series.

min.overlap

number

n

NULL or an integral value giving the filter length for the hanning filter used for removal of low frequency variation.

prewhiten

logical flag. If TRUE each series is whitened using ar.

biweight

logical flag. If TRUE then a robust mean is calculated using tbrm.

method

Can be either "pearson", "kendall", or "spearman" which indicates the correlation coefficient to be used. Defaults to "spearman". See cor.test.

make.plot

logical flag indicating whether to make a plot.

return.rwl

logical flag indicating whether to make a plot.

verbose

logical flag indicating whether to print some results to screen.

Details

This takes an undated series (a floater) and drags it along a dated rwl object in order to estabish possible dates for the series. This function is experimental and under development. It might change in future releases.

Value

By default a data.frame is returned with the first and last year of the period compared as well as the correlation, p-value, and number of observations. If return.rwl is TRUE then a list is returned with the rwl object as well as the data.frame with the correlation statistics.

Author(s)

Andy Bunn. Patched and improved by Mikko Korpela.

See Also

corr.series.seg, skel.plot, series.rwl.plot, ccf.series.rwl

Examples

library(utils)
data(co021)
summary(co021)
foo <- co021[,"645232"]
# 645232  1466 1659
bar <- co021
bar$"645232" <- NULL
out <- xdate.floater(bar, foo, min.overlap = 50, series.name = "Undated")

foo <- co021[,"646118"]
# 646118  1176 1400
bar <- co021
bar$"646118" <- NULL
out <- xdate.floater(bar, foo, min.overlap = 100, series.name = "Undated")
# note that this can fail if a long overlap is needed. This produces the 
# wrong dates.
out <- xdate.floater(bar, foo, min.overlap = 200, series.name = "Undated")

[Package dplR version 1.7.6 Index]