fortify.metaMDS: Fortify a '"mataMDS"' object.

fortify.metaMDSR Documentation

Fortify a "mataMDS" object.

Description

Fortifies an object of class "metaMDS" to produce a data frame of the selected axis scores in long format, suitable for plotting with ggplot2::ggplot().

Usage

## S3 method for class 'metaMDS'
fortify(model, data, axes = 1:2, layers = c("sites", "species"), ...)

## S3 method for class 'metaMDS'
tidy(x, data, layers = c("sites", "species"), ...)

Arguments

model, x

an object of class "metaMDS", the result of a call to vegan::metaMDS().

data

currently ignored.

axes

numeric; which axes to extract scores for.

layers

character; the scores to extract in the fortified object. Passed to display in the respective vegan::scores() method.

...

additional arguments passed to vegan::scores.metaMDS(). Note you can't use display.

Details

TODO

Value

A data frame in long format containing the ordination scores. The first two components are the axis scores.

Author(s)

Gavin L. Simpson

Examples


library("vegan")

data(dune)

ord <- metaMDS(dune)
head(fortify(ord))

ggvegan documentation built on Feb. 28, 2026, 1:07 a.m.