analogue_distances: ggplot-based plot for analogue distance

Description Usage Arguments Value Author(s) Examples

View source: R/plot_analogue_distances.R

Description

Calculate and plot the distance to nearest analogue.

...

Usage

1
2
3
4
5
analogue_distances(spp, fos, df, x_axis, quantiles = c(0.05, 0.1), ...)

## S3 method for class 'analogue_distances'
autoplot(object, df, x_axis, fill = c("salmon",
  "lightyellow", "skyblue"), categories = c("Good", "Fair", "Poor"), ...)

Arguments

spp

data.frame or matrix of calibration set species abundances

fos

data.frame or matrix of fossil species abundances

df

data.frame containing e.g. ages or depths of samples

x_axis

character; name of variable for x-axis. Defaults to sample number.

quantiles

numeric; quantiles of the training set residual lengths to plot

...

extra arguments to MAT. dist.method is the only relevant one.

object

analogue_distance object

fill

character; colours for the background fill for each quality categories

categories

character; names of residuals length quality categories.

Value

Returns a ggplot object.

Author(s)

Richard J. Telford

Examples

1
2
3
4
5
6
require("ggplot2")
data(ImbrieKipp, V12.122, package = "analogue")
## squared residual lengths for Core V12.122
AD <- analogue_distances(ImbrieKipp, V12.122)
autoplot(AD) +
 labs(y = "Squared-chord distance")

richardjtelford/ggpalaeo documentation built on Dec. 7, 2018, 7:55 a.m.