plot.crn: Plot a Tree-Ring Chronology

plot.crnR Documentation

Plot a Tree-Ring Chronology

Description

This function makes a default plot of a tree-ring chronology from a data.frame of the type produced by chron, chron.ars, chron.stabilized, ssf.

Usage

## S3 method for class 'crn'
plot(x, add.spline = FALSE, nyrs = NULL, ...)

Arguments

x

a data.frame of class{crn}.e.g., as produced by chron, chron.ars, chron.stabilized, ssf.

add.spline

a logical flag. Will add a line with a smoothing spline using caps

nyrs

a number giving the rigidity of the smoothing spline. Defaults to 1/3 times the length of the first chronology if nyrs is NULL

...

Additional arguments to pass to plot.

Details

This makes a crude plot of one or more tree-ring chronologies.

Value

None. Invoked for side effect (plot).

Author(s)

Andy Bunn. Patched and improved by Mikko Korpela.

See Also

chron

Examples

library(graphics)
data(wa082)
# Truncate the RW data to a sample depth at least 5
wa082Trunc <- wa082[rowSums(!is.na(wa082))>4,]
# Detrend with age-dependent spline
wa082RWI <- detrend(wa082Trunc,method = "AgeDep")
# make several chronologies
wa082CRN1 <- chron(wa082RWI)
wa082CRN2 <- chron.stabilized(wa082RWI,
                              winLength=51,
                              biweight = TRUE,
                              running.rbar = TRUE)
wa082CRN3 <- chron.ars(wa082RWI)
wa082CRN4 <- ssf(wa082Trunc)

# and plot
plot.crn(wa082CRN1,add.spline = TRUE,nyrs=20)
plot.crn(wa082CRN2,add.spline = TRUE,nyrs=20)
plot(wa082CRN3,add.spline = TRUE,nyrs=20)
plot(wa082CRN4,add.spline = TRUE,nyrs=20)

# a custom crn
foo <- data.frame(wa082CRN1,sfc=wa082CRN4$sfc)
foo <- foo[,c(1,3,2)]
class(foo) <- c("crn","data.frame")
plot.crn(foo,add.spline = TRUE,nyrs=20)


dplR documentation built on June 22, 2024, 9:59 a.m.