Learn R Programming

GUILDS (version 1.4.7)

preston_plot: Barplot in Preston style of an abundance dataset

Description

This function first sorts abundances into octaves, and then plots the resulting distribution.

Usage

preston_plot(abund, expected, ...)

Arguments

abund

vector containing the number of individuals per species

expected

vector containing the expected number of species per octave

...

further graphical arguments that can be passed to barplot()

Author

Thijs Janzen

Examples

Run this code
  theta = 10
  m = 0.1
  J = 1000
  I = m * (J - 1) / (1 - m)
  
  abund <- generate.ESF(theta, I, J)
  par(mfrow = c(1,2))
  preston_plot(abund)
  abund.expect <- expected.SAD(theta, m, J)
  preston_plot(abund, abund.expect)

Run the code above in your browser using DataLab