Learn R Programming

iNEXT (version 2.0.5)

ggiNEXT: ggplot2 extension for an iNEXT object

Description

ggiNEXT: the ggplot2 extension for iNEXT object to plot sample-size- and coverage-based rarefaction/extrapolation curves along with a bridging sample completeness curve.

Usage

ggiNEXT(x, type = 1, se = TRUE, facet.var = "none", color.var = "site",
  grey = FALSE)

Arguments

x
an iNEXT object computed by iNEXT.
type
three types of plots: sample-size-based rarefaction/extrapolation curve (type = 1); sample completeness curve (type = 2); coverage-based rarefaction/extrapolation curve (type = 3).
se
a logical variable to display confidence interval around the estimated sampling curve.
facet.var
create a separate plot for each value of a specified variable: no separation (facet.var="none"); a separate plot for each diversity order (facet.var="order"); a separate plot for each site (facet.var="site"); a
color.var
create curves in different colors for values of a specified variable: all curves are in the same color (color.var="none"); use different colors for diversity orders (color.var="order"); use different colors for sites (co
grey
a logical variable to display grey and white ggplot2 theme.

Value

  • a ggplot2 object

Examples

Run this code
data(spider)
# single-assemblage abundance data
out1 <- iNEXT(spider$Girdled, q=0, datatype="abundance")
ggiNEXT(out1, type=1)
ggiNEXT(out1, type=2)
ggiNEXT(out1, type=3)

# single-assemblage incidence data with three orders q
data(ant)
size <- round(seq(10, 500, length.out=20))
out2 <- iNEXT(ant$h500m, q=c(0,1,2), datatype="incidence", size=size, se=FALSE)
ggiNEXT(out2, se=FALSE, color.var="order")

# multiple-assemblage abundance data with three orders q
out3 <- iNEXT(spider, q=c(0,1,2), datatype="abundance")
ggiNEXT(out3, facet.var="site", color.var="order")
ggiNEXT(out3, facet.var="both", color.var="both")

Run the code above in your browser using DataLab