View source: R/autoplot.residLen.R
| autoplot.residLen | R Documentation |
'reslen'Produces a ggplot object representing the output of objects produced by residLen.
## S3 method for class 'residLen'
fortify(object, df)
## S3 method for class 'residLen'
autoplot(
object,
df,
x_axis,
quantiles = c(0.9, 0.95),
fill = c("salmon", "lightyellow", "skyblue"),
categories = c("Good", "Fair", "Poor")
)
object |
an object of class |
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 |
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("analogue")
require("ggplot2")
data(ImbrieKipp, SumSST, V12.122, package = "analogue")
## squared residual lengths for Core V12.122
rlens <- residLen(ImbrieKipp, SumSST, V12.122)
autoplot(rlens, df = data.frame(age = as.numeric(rownames(V12.122))), x_axis = "age") +
labs(x = "Age", y = "Squared residual distance", fill = "Goodness of fit")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.