skel.plot | R Documentation |
Automatically generates a skeleton plot of tree-ring data.
skel.plot(rw.vec, yr.vec = NULL, sname = "", filt.weight = 9,
dat.out = FALSE, master = FALSE, plot = TRUE)
rw.vec |
a |
yr.vec |
optional |
sname |
an optional |
filt.weight |
filter length for the Hanning filter, defaults to 9 |
dat.out |
|
master |
|
plot |
|
This makes a skeleton plot – a plot that gives the relative growth for
year t
relative to years t-1
and
t+1
. Note that this plot is a standard plot in
dendrochronology and typically made by hand for visually cross-dating
series. This type of plot might be confusing to those not accustomed
to visual cross-dating. See references for more information. The
implementation is based on Meko’s (2002) skeleton plotting approach.
The skeleton plot is made by calculating departures from high
frequency growth for each year by comparing year t
to the
surrounding three years
(t-1
,t
,t+1
). Low frequency
variation is removed using a hanning
filter. Relative
growth is scaled from one to ten but only values greater than three
are plotted. This function’s primary effect is to create plot with
absolute units that can be printed and compared to other plots. Here,
anomalous growth is plotted on a 2mm grid and up to 120 years are
plotted on a single row with a maximum of 7 rows (840 years). These
plots are designed to be plotted on standard paper using an
appropriate device
, e.g., postscript
with defaults or to
pdf
with plot width and height to accommodate a landscape plot,
e.g., width = 10
, height = 7.5
,
paper = "USr"
. These plots are designed to be printable
and cut into strips to align long series. Statistical cross-dating is
possible if the data are output but more easily done using the functions
xskel.plot
and xskel.ccf.plot
.
This function is invoked primarily for its side effect, which is to
produce a plot. If dat.out
is TRUE
then a
data.frame
is returned with the years and height of the
skeleton plot segments as columns.
Andy Bunn. Patched and improved by Mikko Korpela.
Stokes, M. A. and Smiley, T. L. (1968) An Introduction to Tree-Ring Dating. The University of Arizona Press. ISBN-13: 978-0-8165-1680-3.
Sheppard, P. R. (2002) Crossdating Tree Rings Using Skeleton Plotting. https://www.ltrr.arizona.edu/skeletonplot/introcrossdate.htm.
Meko, D. (2002) Tree-Ring MATLAB Toolbox. https://www.mathworks.com/matlabcentral/.
Devices
, hanning
,
xskel.plot
, xskel.ccf.plot
library(utils)
data(co021)
x <- co021[,33]
x.yrs <- time(co021)
x.name <- colnames(co021)[33]
## On a raw ring width series - undated
skel.plot(x)
## On a raw ring width series - dated with names
skel.plot(x, yr.vec = x.yrs, sname = x.name, master = TRUE)
## Not run:
library(grDevices)
## Try cross-dating
y <- co021[, 11]
y.yrs <- time(co021)
y.name <- colnames(co021)[11]
## send to postscript - 3 pages total
fname1 <- tempfile(fileext=".ps")
print(fname1) # tempfile used for PS output
postscript(fname1)
## "Master series" with correct calendar dates
skel.plot(x, yr.vec = x.yrs, sname = x.name, master = TRUE)
## Undated series, try to align with last plot
skel.plot(y)
## Here's the answer...
skel.plot(y, yr.vec = y.yrs, sname = y.name)
dev.off()
unlink(fname1) # remove the PS file
## alternatively send to pdf
fname2 <- tempfile(fileext=".pdf")
print(fname2) # tempfile used for PDF output
pdf(fname2, width = 10, height = 7.5, paper = "USr")
skel.plot(x, yr.vec = x.yrs, sname = x.name, master = TRUE)
skel.plot(y)
skel.plot(y, yr.vec = y.yrs, sname = y.name)
dev.off()
unlink(fname2) # remove the PDF file
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.