Learn R Programming

ggvegan (version 0.2.1)

fortify.poolaccum: Fortify extrapolated species richness of a species pool

Description

Prepares a fortified version of results from vegan::poolaccum() objects.

Usage

# S3 method for poolaccum
fortify(model, data, alpha = 0.05, ...)

# S3 method for poolaccum tidy(x, data, alpha = 0.05, ...)

Value

A data frame with columns index, size, richness, lower, upper, and std_dev, containing the richness index, permutation richness estimator, sample size, upper and lower \(1 - \alpha\)

quantile interval, and standard deviation of permutation estimates, respectively.

Arguments

model, x

an object of class vegan::poolaccum().

data

original data set. Currently ignored.

alpha

level of quantiles for envelopes shown (default 0.05).

...

additional arguments passed to vegan::summary.poolaccum(), notably display to control which indices should be computed.

Author

Gavin L. Simpson & Didzis Elferts

Examples

Run this code

library("vegan")
library("ggplot2")
data(BCI)
pool <- poolaccum(BCI)
df <- fortify(pool)
df

ggplot(df, aes(x = size, y = richness, colour = index)) +
    geom_ribbon(aes(ymin = lower, ymax = upper, x = size, fill = index),
                alpha = 0.3, inherit.aes = FALSE) +
    geom_line() +
    facet_wrap(~ index)

Run the code above in your browser using DataLab