StatVectorfit | R Documentation |
Fits arrows to show the direction of fastest increase
in continuous environmental variables in ordination space.The
arrows are scaled relative to their correlation coefficient,
and they can be added to an ordination plot with geom_ordi_arrow()
.
stat_vectorfit(
mapping = NULL,
data = NULL,
geom = "text",
position = "identity",
na.rm = FALSE,
show.legend = FALSE,
inherit.aes = TRUE,
edata = NULL,
formula = NULL,
arrowmul = NULL,
...
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
geom |
The geometric object to use to display the data, either as a
|
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
na.rm |
Remove missing values (Not Yet Implemented). |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
edata |
Environmental data where the continuous variables are found. |
formula |
Formula to select variables from |
arrowmul |
Multiplier to arrow length. If missing, the multiplier is selected automatically so that arrows fit the current graph. |
... |
Other arguments passed to the functions. |
library("vegan")
data(mite, mite.env)
m <- metaMDS(mite, trace = FALSE, trymax = 100)
## add fitted vectors for continuous variables
ordiggplot(m) +
geom_ordi_point("sites") +
geom_ordi_arrow("sites", stat = "vectorfit", edata = mite.env)
## can be faceted
ordiggplot(m) + geom_ordi_point("sites") +
geom_ordi_arrow("sites", stat = "vectorfit", edata = mite.env) +
facet_wrap(mite.env$Topo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.