siteRarePlots: Site-based rarefaction plots

View source: R/siteRarePlots.R

siteRarePlotsR Documentation

Site-based rarefaction plots

Description

#Function to make "Linc-style" rarefaction plots using \pgkvegan

Usage

siteRarePlots(
  d,
  Ncol = NA,
  Nrow = NA,
  measType = "Chao1",
  textRange = c(0.1, 0.4),
  seMult = 1,
  rowOrder = "asis"
)

Arguments

d

Matrix of species abundance (rows = sites, cols = species)

Ncol

Number of columns for facets

Nrow

Number of rows for facets

measType

Diversity predictor ('Chao1' or 'none')

textRange

Proportion upper/lower bounds for text display. Can be 2 values overall, or 2 x N sites (min1,max1,min2,max2,...,minN,maxN).

seMult

Multiplier for SE (default = 1)

rowOrder

Should sites in facets be ordered by row order ('asis'), observed diversity ('Ndiv'), or # of samples ('Nsamp')?

Value

A ggplot object

Examples

data(dune,package='vegan')

#Site-by-site
siteRarePlots(dune,Ncol = 5,Nrow=4,measType = 'Chao1',seMult = 2)

#Overall
oDune <-t(as.matrix(colSums(dune)))
siteRarePlots(oDune,Ncol = 1,Nrow=1,measType = 'Chao1',seMult = 2)

samuelVJrobinson/SRtools documentation built on Nov. 11, 2024, 12:37 p.m.