fortify.prc: Fortify a '"prc"' object

fortify.prcR Documentation

Fortify a "prc" object

Description

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

Usage

## S3 method for class 'prc'
fortify(model, data, scaling = "symmetric", axis = 1, ...)

## S3 method for class 'prc'
tidy(x, data, scaling = "symmetric", axis = 1, ...)

Arguments

model, x

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

data

currently ignored.

scaling

the desired scaling. See vegan::scores.cca() for details.

axis

numeric; which PRC axis to extract. Default is axis = 1, which is the most generally useful choice.

...

additional arguments currently ignored.

Details

TODO

Value

A data frame in long format containing the ordination scores. The first three components are the Time, Treatment, and associated Response. The last two components, score and label are an indicator factor and a label for the rows for use in plotting.

Author(s)

Gavin L. Simpson

Examples

library("vegan")
data(pyrifos)
week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24))
dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11))
ditch <- gl(12, 1, length=132)

pyrifos_prc <- prc(pyrifos, dose, week)
fortify(pyrifos_prc)

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