Plot or Extract Results of Constrained Correspondence Analysis or Redundancy Analysis
Functions to plot or extract results of constrained correspondence analysis
cca), redundancy analysis (
constrained analysis of principal coordinates (
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
## S3 method for class 'cca' plot(x, choices = c(1, 2), display = c("sp", "wa", "cn"), scaling = "species", type, xlim, ylim, const, correlation = FALSE, hill = FALSE, ...) ## S3 method for class 'cca' text(x, display = "sites", labels, choices = c(1, 2), scaling = "species", arrow.mul, head.arrow = 0.05, select, const, axis.bp = TRUE, correlation = FALSE, hill = FALSE, ...) ## S3 method for class 'cca' points(x, display = "sites", choices = c(1, 2), scaling = "species", arrow.mul, head.arrow = 0.05, select, const, axis.bp = TRUE, correlation = FALSE, hill = FALSE, ...) ## S3 method for class 'cca' scores(x, choices = c(1,2), display = c("sp","wa","cn"), scaling = "species", hill = FALSE, ...) ## S3 method for class 'rda' scores(x, choices = c(1,2), display = c("sp","wa","cn"), scaling = "species", const, correlation = FALSE, ...) ## S3 method for class 'cca' summary(object, scaling = "species", axes = 6, display = c("sp", "wa", "lc", "bp", "cn"), digits = max(3, getOption("digits") - 3), correlation = FALSE, hill = FALSE, ...) ## S3 method for class 'summary.cca' print(x, digits = x$digits, head = NA, tail = head, ...) ## S3 method for class 'summary.cca' head(x, n = 6, tail = 0, ...) ## S3 method for class 'summary.cca' tail(x, n = 6, head = 0, ...)
Scores shown. These must include some of the
Scaling for species and site scores. Either species
The type of scores can also be specified as one of
Type of plot: partial match to
the x and y limits (min,max) of the plot.
Optional text to be used instead of row names.
Factor to expand arrows in the graph. Arrows will be scaled automatically to fit the graph if this is missing.
Default length of arrow heads.
Items to be displayed. This can either be a logical
vector which is
General scaling constant to
Number of axes in summaries.
Number of digits in output.
Number of rows printed from the head and tail of
species and site scores. Default
Parameters passed to other functions.
plot function will be used for
rda. This produces a quick, standard plot with current
plot function sets colours (
pch) and character sizes (
certain standard values. For a fuller control of produced plot, it is
best to call
type="none" first, and then add
each plotting item separately using
points.cca functions. These use the default settings of standard
points functions and accept all
their parameters, allowing a full user control of produced plots.
Environmental variables receive a special treatment. With
display="bp", arrows will be drawn. These are labelled with
text and unlabelled with
points. The basic
function uses a simple (but not very clever) heuristics for adjusting
arrow lengths to plots, but the user can give the expansion factor in
display="cn" the centroids of levels of
factor variables are displayed (these are available only if there were
factors and a formula interface was used in
rda). With this option continuous
variables still are presented as arrows and ordered factors as arrows
If you want to have still a better control of plots, it is better to
produce them using primitive
plot commands. Function
scores helps in extracting the
needed components with the selected
summary lists all scores and the output can be very
long. You can suppress scores by setting
axes = 0 or
display = NA or
display = NULL. You can display some
first or last (or both) rows of scores by using
tail or explicit
Palmer (1993) suggested using linear constraints
(“LC scores”) in ordination diagrams, because these gave better
results in simulations and site scores (“WA scores”) are a step from
constrained to unconstrained analysis. However, McCune (1997) showed
that noisy environmental variables (and all environmental
measurements are noisy) destroy “LC scores” whereas “WA scores”
were little affected. Therefore the
plot function uses site
scores (“WA scores”) as the default. This is consistent with the
usage in statistics and other functions in R
plot function returns invisibly a plotting structure which
can be used by function
identify.ordiplot to identify
the points or other functions in the
Package ade4 has function
returns constrained correspondence analysis of the same class as the
vegan function. If you have results of ade4 in your
working environment, vegan functions may try to handle them and
fail with cryptic error messages. However, there is a simple utility
ade2vegancca which tries to translate ade4
cca results to vegan
cca results so that some
vegan functions may work partially with ade4 objects
(with a warning).
for getting something
ordiplot for an alternative plotting routine
and more support functions, and
arrows for the basic routines.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
data(dune) data(dune.env) mod <- cca(dune ~ A1 + Moisture + Management, dune.env) plot(mod, type="n") text(mod, dis="cn") points(mod, pch=21, col="red", bg="yellow", cex=1.2) text(mod, "species", col="blue", cex=0.8) ## Limited output of 'summary' head(summary(mod), tail=2) ## Scaling can be numeric or more user-friendly names ## e.g. Hill's scaling for (C)CA scrs <- scores(mod, scaling = "sites", hill = TRUE) ## or correlation-based scores in PCA/RDA scrs <- scores(rda(dune ~ A1 + Moisture + Management, dune.env), scaling = "sites", correlation = TRUE)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.