View source: R/plot_analogue_distances.R
| analogue_distances | R Documentation |
Calculate and plot the distance to nearest analogue.
...
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"),
...
)
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 |
object |
analogue_distance object |
fill |
character; colours for the background fill for each quality categories |
categories |
character; names of residuals length quality categories. |
Returns a ggplot object.
Richard J. Telford
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", x = "n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.