Skip to contents

Prepares a data frame of results from a vegan::fisherfit()) object suitable for plotting with ggplot2::ggplot()).

Usage

# S3 method for class 'fisherfit'
fortify(model, data, ...)

# S3 method for class 'fisherfit'
tidy(x, data, ...)

Arguments

model, x

an object of class vegan::fisherfit()).

data

original data set. Currently ignored.

...

other arguments pass to methods. Currently ignored.

Value

A data frame with columns 'Rank' and 'Abundance'. Additionally, Fisher's \(\alpha\) and the nuisance parameter are returned as attributes 'alpha' and 'k' respectively.

Author

Gavin L. Simpson

Examples


library("vegan")

data(BCI)
mod <- fisherfit(BCI[5,])
head(fortify(mod))
#> # A tibble: 6 × 2
#>    rank abundance
#>   <dbl>     <int>
#> 1     1        36
#> 2     2        17
#> 3     3        13
#> 4     4         4
#> 5     5         6
#> 6     6         5