Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

common.interval

Common Interval


Description

This function finds the common interval on a set of tree-ring widths such as that produced by read.rwl.

Usage

common.interval(rwl, type=c("series", "years", "both"),
                make.plot=TRUE)

Arguments

rwl

a data.frame of ring widths with rownames(x) containing years and colnames(x) containing each series ID such as produced by read.rwl

type

a character string of "series", "years", or "both". Argument matching is performed.

make.plot

a logical indicating if a plot should be drawn

Details

This trims an rwl object to a common interval that maximizes the number of series (type="series"), the number of years (type="years"), or a compromise between the two (type="both"). A modified seg.plot can be drawn as well.

Value

A data.frame with colnames(x) and rownames(x).

Author(s)

Filipe Campelo, Andy Bunn and Mikko Korpela

See Also

Examples

library(utils)
data(co021)
co021.s <- common.interval(co021, type="series", make.plot=TRUE)
co021.y <- common.interval(co021, type="years", make.plot=TRUE)
co021.b <- common.interval(co021, type="both", make.plot=TRUE)

dim(co021)
dim.s <- dim(co021.s)
dim.s       # the highest number of series
prod(dim.s) #   (33 series x 288 years = 9504)
dim.y <- dim(co021.y)
dim.y       # the highest number of years
prod(dim.y) #   (27 series x 458 years = 12366)
dim.b <- dim(co021.b)
dim.b       # compromise solution
prod(dim.b) #   (28 series x 435 years = 12180)

dplR

Dendrochronology Program Library in R

v1.7.2
GPL (>= 2)
Authors
Andy Bunn [aut, cph, cre, trl], Mikko Korpela [aut, cph, trl], Franco Biondi [aut, cph], Filipe Campelo [aut, cph], Pierre Mérian [aut, cph], Fares Qeadan [aut, cph], Christian Zang [aut, cph], Allan Buras [ctb], Jacob Cecile [ctb], Manfred Mudelsee [ctb], Michael Schulz [ctb], Klesse Stefan [ctb], Frank David [ctb], Visser Ronald [ctb]
Initial release
2021-01-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.