Learn R Programming

analogue (version 0.17-7)

panel.Loess: Loess smooths to stratigraphic diagrams

Description

A modified version of panel.loess, for drawing Loess smooths on stratigraphic diagrams.

Usage

panel.Loess(x, y,
            span = 1/3, degree = 1,
            family = c("symmetric","gaussian"),
            evaluation = 50,
            lwd = plot.line$lwd,
            lty = plot.line$lty,
            col,
            col.line = plot.line$col,
            type,
            ...)

Arguments

x, y

variables defining the contents of the panel.

span, degree, family, evaluation

arguments passed to loess.smooth, for which panel.Loess is a wrapper.

lwd, lty, col, col.line

graphical parameters.

type

for compatibility with panel.loess, but is ignored within the function.

...

graphical parameters can be supplied. Color can usually be specified by col, col.line, the latter overriding the first for lines.

Author

Gavin L. Simpson, slightly modified from the Lattice function panel.loess by Deepayan Sarkar.

Details

The standard panel function panel.loess treats the data as the x-axis acting as the time component. For stratigraphic plots where time flows along the y-axis, we want the smoother to be fitted with the x-axis data as the response and the time component (y-axis) as the predictor.

This modified version of panel.loess flips the two axes to produce the desired effect. Note also that it does not have argument horizontal as this is not required or supported by Stratiplot. In other respects, panel.Loess is equivalent to the lattice panel function panel.loess.

User should note that warnings can be generated by the fitting function if span is set too small for species with few observations. In such cases, the user is directed to the help page for loess.smooth, but increasing span slightly can often stop the warnings.

See Also