Learn R Programming

spacodiR (version 0.13.0115)

spacodi.permutplot: EXPERIMENTAL: plotting observed and expected community structure across branching times of a phylogeny

Description

spacodi.permutplot is a function used to plot departures from null expectations of diversity turnover, nodewise for a phylogeny.

Usage

spacodi.permutplot(spacodi.permutations, cex=list(pch=1.5, rand=0.1, node=0.5, legend=0.75), transp=0.8, col = list("black", "lightgray"), bg = list("white", "lightgray", "black"), all.points = TRUE, add.id = TRUE, sig.plot = TRUE, cut.off = 0.05, envelope = FALSE, outfile = NULL, ...)

Arguments

spacodi.permutations
a list-object generated by spacodi.by.nodes
cex
a named list of scalings for node symbols (pch), permutations (rand), node labels, and legend
transp
degree of color transparency: transp=1 is opaque
col
a list of two elements: colors to be used for plotting observed and expected community structure
bg
a list of background (fill) colors to be used for plotting observed and expected community structure
all.points
Boolean; whether all permutation estimates are to be plotted
add.id
Boolean; whether node.labels are placed near nodewise estimates of community structure
sig.plot
Boolean; whether nodes are colored by significance of observed and expected estimates of structure
cut.off
a value, if sig.plot=TRUE, distinguishing observed from expected estimates of structure
envelope
Boolean; whether a smooth-spline envelope is drawn around permutation estimates of structure
outfile
an optional .pdf file to which to write output
...
additional plotting parameters to be optionally supplied

Value

Details

This function generates a plot of diversity turnover, evaluated for each subtree of the supplied phylogeny. If all.points=TRUE, empirical estimates of structure as well as those expected from permuted community datasets are plotted together. Several methods are available for data permutation when using spacodi.by.nodes, typically the function used to generate spacodi.permutations.

See Also

spacodi.calc for further details on diversity structure; spacodi.by.nodes; smooth.spline

Examples

Run this code
# load a species-by-plots matrix, along with a tree
data(sp.example)
attach(sp.example)
spl
phy

# generate a plot of observed and expected Bst
sp.permut=spacodi.by.nodes(sp.plot=spl, phy=phy, n.rep=10)
spacodi.permutplot(sp.permut,bty="n")

Run the code above in your browser using DataLab