plot.minDC {analogue} | R Documentation |
Minimum dissimilarity is a useful indicator of reliability of reconstructions performed via MAT and other methods, and for analogue matching. Minimum dissimilarity for a sample is the smallest dissimilarity between it and the training set samples.
## S3 method for class 'minDC': plot(x, depths, use.labels = FALSE, quantiles = TRUE, rev.x = TRUE, type = "l", xlim, ylim, xlab = "", ylab = "Dissimilarity", main = "", sub = NULL, col.quantile = "red", lty.quantile = "dotted", ...)
x |
an object of class "minDC" . |
depths |
numeric; a vector of depths for which predicted values
exist or will be generated. Can be missing, in which case,
if use.labels = TRUE , the function will attempt to
derive suitable values for you. See Details below. |
use.labels |
logical; should reconPlot attempt to derive
values for argument depths from the names of the predicted
values? Only use if depths is missing. See Details below. |
quantiles |
logical; should the probability quantiles be drawn on the plot? |
rev.x |
logical; should the depth/age axis be reversed (drawn from high to low)? |
type |
type of line drawn. See par and argument
"type" . |
xlab, ylab |
character; the x- and y-axis labels respectively. |
main, sub |
character; main title and subtitle for the plot. |
xlim, ylim |
numeric, length 2; the x- and y-limits for the
plotted axes. If not provided, the function will calculate
appropriate values to cover the range of plotted values and any
quantile lines (if requested via "quantiles" . |
col.quantile |
colour in which to draw the quantile lines. |
lty.quantile |
line type in which to draw the quantile lines. |
... |
arguments to be passed to methods, such as graphical
parameters (see par ). Currently ignored. |
Conventionally, these plots are drawn on a depth or an age
scale. Argument depths
is used to provide the depth or age
axis, against which the predicted values are plotted.
If depths
is not provided, then the function will try to
derive the appropriate values from the labels of the predictions if
use.labels = TRUE
. You must provide depths
or set
use.labels = TRUE
otherwise an error will result. The derived
labels will be coerced to numerics. If your labels are coercible, then
you'll either get nonsense on the plot or an error from R. If so,
provide suitable values for depths
.
A plot on the currently active device.
Gavin L. Simpson
## continue the RLGH example from ?join example(join) ## fit the MAT model using the squared chord distance measure swap.mat <- mat(swapdiat, swappH, method = "SQchord") swap.mat ## reconstruct for the RLGH core data rlgh.mat <- predict(swap.mat, rlgh, k = 10) ## extract the minimum DC values rlgh.mdc <- minDC(rlgh.mat) rlgh.mdc ## draw a plot of minimum DC by time plot(rlgh.mdc, use.labels = TRUE, xlab = "Depth (cm.)")