detectRings: Detect Tree-Ring Borders

View source: R/detectRings.R

detectRingsR Documentation

Detect Tree-Ring Borders

Description

This function identifies tree-ring borders on X-ray microdensity profiles.

Usage

detectRings(x, y = NULL, k = 3, minTrw = 3, threshold = 0.215)

Arguments

x

a dataframe with X-ray microdensity profiles or an "xRingList" object

y

a dataframe with the first and last year in columns and the series in rows, is NULL by default

k

width of the rolling window to find the local maximum and minimum (for more details please see the help of getBorders function)

minTrw

integer width of the narrowest tree-ring, rings narrower than this value will not be considered

threshold

the minimum difference between local maximum and minimum density to identify a tree-ring border

Details

This function uses the getBorders function to identify tree-ring borders based on the difference between local maximum and minimum density.

Value

detectRings returns an "xRingList" object, an S3 class with "xRing" lists as members, with the following elements:

span first and last year

trw gives the tree-ring width

name a string giving the series name

limits a vector with the position of the tree-ring borders

years a vector with the calendar year

profile.raw a vector with the input

See Also

getBorders

Examples


data(PaPiRaw)
data(PaPiSpan)
PaPi <- toxRingList(PaPiRaw, PaPiSpan)
PaPi <- detectRings(PaPi)
# give the same
PaPi <- detectRings(PaPiRaw, PaPiSpan)
# Because the last year is not supplied the last year for all series is the last calendar year
# as.numeric(format(Sys.time(), "%Y"))-1
PaPi <- detectRings(PaPiRaw)


xRing documentation built on April 22, 2022, 5:05 p.m.

Related to detectRings in xRing...