fortify.renyiaccum | R Documentation |
Prepares a fortified version of results from
vegan::renyiaccum()
objects.
## S3 method for class 'renyiaccum'
fortify(model, data, ...)
model |
an object of class |
data |
original data set. Currently ignored. |
... |
additional arguments passed to other methods. Ignored in this method. |
A data frame (tibble) is returned. What is returned depends on how
vegan::renyiaccum()
was called.
If raw = FALSE
, then a data frame with columns site
, scale
, mean
,
std_dev
, min
, max
, q2.5
, and q97.5
, containing the accumulated
sites, the Rényi scale, and summary statistics of the
Rényi accumulation curves. An additional column collector
will be present if collector = TRUE
was used in the vegan::renyiaccum()
call.
If raw = TRUE
, then a data frame with columns site
, permutation
,
scale
, and diversity
, containing the site
and permutation
identifiers, Rényi scale, and the Rényi
diversity, respectively.
Gavin L. Simpson much rewritten from an original by Didzis Elferts.
library("ggplot2")
data(BCI)
pool <- renyiaccum(BCI)
df <- fortify(pool)
df
ggplot(df, aes(x = site, y = mean)) +
geom_ribbon(aes(ymin = q2.5, ymax = q97.5, x = site),
alpha = 0.2, inherit.aes = FALSE) +
geom_line() +
facet_wrap(~ scale)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.