scale_arrow {ggordiplots} | R Documentation |
Scale Arrows to Plot
Description
Scales envfit arrows to fit within 75
Usage
scale_arrow(arrows, data, at = c(0, 0), fill = 0.75)
Arguments
arrows |
A two column data frame of coordinates from envfit result. |
data |
A two column data frame of coordinates for ordination plot. |
at |
coordinates of origin (0, 0) |
fill |
proportion of plot area to fill with maximum arrow length |
Value
Silently returns a data frame of scaled coordinates for adding arrows to ordination plot.
Author(s)
Jari Oksanen with modifications by Gavin Simpson and John Quensen
Examples
data("varespec")
data("varechem")
vare_dist <- vegdist(varespec)
vare_mds <- monoMDS(vare_dist)
plt1 <- gg_envfit(ord=vare_mds, env=varechem, plot = FALSE)
mult <- scale_arrow(plt1$df_arrows, plt1$df_ord[ , c("x", "y")])
mult
[Package ggordiplots version 0.4.3 Index]