biplot.rda | R Documentation |
Draws a PCA biplot with species scores indicated by biplot arrows
## S3 method for class 'rda'
biplot(x, choices = c(1, 2), scaling = "species",
display = c("sites", "species"), type, xlim, ylim, col = c(1,2),
const, correlation = FALSE, ...)
x |
A |
choices |
Axes to show. |
scaling |
Scaling for species and site scores. Either species
( The type of scores can also be specified as one of |
correlation |
logical; if |
display |
Scores shown. These must some of the alternatives
|
type |
Type of plot: partial match to |
xlim , ylim |
the x and y limits (min, max) of the plot. |
col |
Colours used for sites and species (in this order). If only one colour is given, it is used for both. |
const |
General scaling constant for |
... |
Other parameters for plotting functions. |
Produces a plot or biplot of the results of a call to
rda
. It is common for the "species" scores in a PCA to
be drawn as biplot arrows that point in the direction of increasing
values for that variable. The biplot.rda
function provides a
wrapper to plot.cca
to allow the easy production of such a
plot.
biplot.rda
is only suitable for unconstrained models. If
used on an ordination object with constraints, an error is issued.
If species scores are drawn using "text"
, the arrows are drawn
from the origin to 0.85 * species score, whilst the labels are
drawn at the species score. If the type used is "points"
, then
no labels are drawn and therefore the arrows are drawn from the origin
to the actual species score.
The plot
function returns invisibly a plotting structure which
can be used by identify.ordiplot
to identify
the points or other functions in the ordiplot
family.
Gavin Simpson, based on plot.cca
by Jari Oksanen.
plot.cca
, rda
for something to
plot, ordiplot
for an alternative plotting routine
and more support functions, and text
,
points
and arrows
for the basic routines.
data(dune)
mod <- rda(dune, scale = TRUE)
biplot(mod, scaling = "symmetric")
## different type for species and site scores
biplot(mod, scaling = "symmetric", type = c("text", "points"))
## We can use ordiplot pipes in R 4.1 to build similar plots with
## flexible control
## Not run:
if (getRversion() >= "4.1") {
plot(mod, scaling = "symmetric", type="n") |>
text("sites", cex=0.8) |>
text("species", arrows=TRUE, length=0.02, col="red", cex=0.6)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.