gg_ordibubble: Ordination Bubble Plot

View source: R/gg_ordibubble.R

gg_ordibubbleR Documentation

Ordination Bubble Plot

Description

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.

Usage

gg_ordibubble(
  ord,
  env.var,
  groups = NA,
  var.label = "Level",
  choices = c(1, 2),
  plot = TRUE
)

Arguments

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.

Value

Silently returns the plot and data frames used for the plotting.

Examples

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")


ggordiplots documentation built on June 22, 2024, 12:05 p.m.