pattern_plot: Facet grid to examine patterns in multivariate data (ggplot2)

View source: R/pattern_plot.R

pattern_plotR Documentation

Facet grid to examine patterns in multivariate data (ggplot2)

Description

ggplot2 based facet_grid to examine patterns in multivariate data

Usage

pattern_plot(
  mod,
  axis = 1,
  sides = "both",
  n = 10,
  species = NULL,
  expls = NULL,
  log_trans = FALSE,
  X = NULL,
  Y = NULL
)

Arguments

mod

cca or rda object from vegan.

axis

ordination axis, which should be used for the plot

sides

Character vector specifying which columns should be shown. Options: "both" shows n/2 from both sides of the axis ordered by species scores; "contrib" orders the species based on "contributions" to the axis (squared species scores); pos orders the species based on the species score to the axis and "neg" orders the species based on the inverted species score to the axis.

n

integer giving the number of species that should be plotted. Species are chosen based on contribution to axis

species

character vector specifying the species names that should be forced to the plot. Any missing species will be taken from the n_sps argument. If NULL all species will be taken from the n_sps argument.

expls

character vector specifying the environmental/explanatory variable names that should be used in the plot. If NULL and constrained model, variables will be taken from mod.

log_trans

logical indicating whether species values should be logarithm + 1 transformed before plotting.

X

optional species data frame. If NULL, the same data frame than in mod will be used.

Y

optional constraining variable data frame. If NULL, the same data frame than in mod will be used.

Author(s)

Mikko Vihtakari


MikkoVihtakari/veganUtils documentation built on May 3, 2023, 9:58 a.m.