Learn R Programming

ggvegan (version 0.2.1)

fortify.prc: 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 prc
fortify(model, data, scaling = "symmetric", axis = 1, ...)

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

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.

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.

Author

Gavin L. Simpson

Details

TODO

Examples

Run this code
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)

Run the code above in your browser using DataLab