ggbiplot_vegan: GGbiplot prototype function

View source: R/multivariate_ggvis_ggbiplot_MAIN.R

ggbiplot_veganR Documentation

GGbiplot prototype function

Description

Wrapper function around all geoms to construct a ggplot for vegan objects (rda, cca, capscale)

Usage

ggbiplot_vegan(x, ...)

## S3 method for class 'rda'
ggbiplot_vegan(x, ...)

## S3 method for class 'cca'
ggbiplot_vegan(x, ...)

## S3 method for class 'capscale'
ggbiplot_vegan(x, ...)

## S3 method for class 'princomp'
ggbiplot_vegan(x, ...)

## S3 method for class 'prcomp'
ggbiplot_vegan(x, ...)

## Default S3 method:
ggbiplot_vegan(x, choices = 1:2, scaling = 2,
  site_data = NULL, site_merge_by = "row.names", species_data = NULL,
  species_merge_by = "row.names", site_geom = "point",
  site_mapping = aes(label = Row.names), centroid_geom = "blank",
  centroid_mapping = aes(group = 1), ellipse_geom = "blank",
  ellipse_mapping = NULL, species_geom = "arrow",
  species_mapping = aes(label = Row.names), cor_circle_geom = "blank",
  cor_circle_mapping = NULL, lc_geom = "blank",
  lc_mapping = aes(label = Row.names), bp_geom = "blank",
  bp_mapping = NULL, cn_geom = "blank", cn_mapping = aes(label =
  .level), species_abbrev = FALSE, species_adjust = 1.1,
  ellipse_level = 0.68, base_colors = c("black", "red", "blue"),
  base_shapes = c(16, 16, 16), base_sizes = c(2, 2, 2),
  legend_position = "right", ...)

Arguments

x

vegan object

...

other arguments for ggbiplot_vegan.default

choices

which 2 components schould be visualized

scaling

used scaling (1 = site, 2 = species (default)). If scaling = 2, than the angle of the species (variables) matches the correlation

site_data

descriptor data for the sites

site_merge_by

merge the site descriptor with the vegan object on .Rownumbers (cbind), .Rownames or any other column (merge this column with the site scores matrix rownames)

species_data

descriptor data for the species

species_merge_by

merge species data (see site_merge_by)

site_geom

which geom to represent the sites "blank", "point", "text"

site_mapping

ggplot mapping in the format aes() but x and y must not be given, so for example (aes(color = Kolom1, size = Kolom2, label = Kolom3)). This should always contain the label argument if the geom is "text"

centroid_geom

representation of the site centroids ("blank", "point", "text")

centroid_mapping

ggplot mapping for the centroids (see site_mapping)

ellipse_geom

representation of the site probability density ellipses ("blank", "line")

ellipse_mapping

ggplot mapping for the ellipses

species_geom

representation of the species (or biometric variables) ("blank", "text", "arrow", "point")

species_mapping

ggplot mapping for the species

cor_circle_geom

representation of the correlation circle ("blank", "line")

cor_circle_mapping

ggplot mapping for the correlation circle

lc_geom

representation of linear constraints (see site_geom)

lc_mapping

see site_mapping but for the linear constraints

bp_geom

representation of the continuous environmental variables ("blank", "arrow", "text", "point")

bp_mapping

mapping of the continuous environmental variables

cn_geom

representation of the discrete environmental variables

cn_mapping

mapping of the discrete environmental variables

species_abbrev

logical that controls if species names (or variables when not working with vegetation data) should be abbreviated

species_adjust

adjustment of the species labels so they do not collide with the arrows

ellipse_level

probability density on which the ellipses should be based. 0.68 or 0.95 are the most logical choices (1 or 2 sd from the centroids)

base_colors

vector of 3 elements with the base colors of sites, species and environmental variables

base_shapes

vector of 3 elements with the base shapes for sites, species and environmental variables

base_sizes

vector of 3 elements with the base sizes for sites, species and environmental variables

legend_position

position of the legend "top", "bottom", "left", "right", "none"


inbo/inboggvegan documentation built on July 31, 2023, 6:51 p.m.