View source: R/gg_ordibubble.R
gg_ordibubble | R Documentation |
Makes a simple ordination plot of site with the symbol size scaled to an environmental variable. Result is similar to that of BiodiversityR's ordibubble function.
gg_ordibubble(
ord,
env.var,
groups = NA,
var.label = "Level",
choices = c(1, 2),
plot = TRUE
)
ord |
An ordination object |
env.var |
An environmental variable. |
groups |
A vector of groups (optional). |
var.label |
Label for the legend; default is "Level." |
choices |
Axes to be plotted. |
plot |
A logical for plotting; defaults to TRUE. |
Silently returns the plot and data frames used for the plotting.
data(dune)
data(dune.env)
dune.bray <- vegdist(dune, method = "bray")
ord <- cmdscale(dune.bray, k=(nrow(dune)-1), eig=TRUE, add=TRUE)
gg_ordibubble(ord, env.var=dune.env$A1, var.label="A1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.