Learn R Programming

Momocs (version 1.0.0)

plot_CV: Plots a cross-validation table as an heatmap

Description

Either with frequencies (or percentages) plus marginal sums, and values as heatmaps. Used in Momocs for plotting cross-validation tables but may be used for any table (likely with freq=FALSE).

Usage

plot_CV(x, ...)
"plot_CV"(x, freq = TRUE, rm0 = TRUE, cex = 5, round = 2, labels = TRUE, ...)
"plot_CV"(x, freq = TRUE, rm0 = TRUE, cex = 5, round = 2, labels = TRUE, ...)

Arguments

x
a (cross-validation table) or an LDA object
...
only used for the generic
freq
logical whether to display frequencies or counts
rm0
logical whether to remove zeros
cex
numeric to adjust labels in every cell. NA to remove them
round
numeric, when freq=TRUE how many decimals should we display
labels
logical whether to display freq or counts as text labels

Value

a ggplot object

See Also

LDA, plot.LDA, and (pretty much the same) Ntable.

Examples

Run this code
data(olea)
ol <- LDA(PCA(opoly(olea, 5)), "domes")
gg <- plot_CV(ol) # just a wrapper for plot_CV(ol$CV.tab) though
gg

Run the code above in your browser using DataLab