scale_arrow | R Documentation |
Scales envfit arrows to fit within 75
scale_arrow(arrows, data, at = c(0, 0), fill = 0.75)
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 |
Silently returns a data frame of scaled coordinates for adding arrows to ordination plot.
Jari Oksanen with modifications by Gavin Simpson and John Quensen
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.