Learn R Programming

betapart (version 1.5.4)

plot.decay: Plotting distance decay curves from models computed with decay.model()

Description

Takes the output of decay.model() and plots a distance-decay curve, either a negative exponential or power law function as estimated with decay.model().

Usage

# S3 method for decay
plot(x, xlim=c(0,max(x$data[,1])), ylim=c(0,1), 
add=FALSE, remove.dots=FALSE, col="black", pch=1, lty=1, lwd=5, cex=1, ...)

Arguments

x

the output of decay.model().

xlim

the range of spatial distances to be plotted, default is from 0 to the maximum distance in the data.

ylim

the range of assemblage similarities or dissimilarities to be plotted, default is from 0 to 1.

add

add to the previous plot.

remove.dots

remove the dots from the plot, thus retaining just the decay curve.

col

colour used.

pch

symbol used for points.

lty

line type.

lwd

line width.

cex

scale of text and symbols.

...

other parameters for plotting functions.

References

G<U+00F3>mez-Rodr<U+00ED>guez, C. & Baselga, A. 2018. Variation among European beetle taxa in patterns of distance decay of similarity suggests a major role of dispersal processes. Ecography, in press

See Also

decay.model

Examples

Run this code
# NOT RUN {
require(vegan)

data(BCI)
## UTM Coordinates (in metres)
UTM.EW <- rep(seq(625754, 626654, by=100), each=5)
UTM.NS <- rep(seq(1011569,  1011969, by=100), len=50)

spat.dist<-dist(data.frame(UTM.EW, UTM.NS))

dissim.BCI<-beta.pair.abund(BCI)$beta.bray.bal

plot(spat.dist, dissim.BCI, ylim=c(0,1), xlim=c(0, max(spat.dist)))

BCI.decay.exp<-decay.model(dissim.BCI, spat.dist, model.type="exp", perm=100)

BCI.decay.pow<-decay.model(dissim.BCI, spat.dist, model.type="pow", perm=100)

plot.decay(BCI.decay.exp, col=rgb(0,0,0,0.5))
plot.decay(BCI.decay.exp, col="red", remove.dots=TRUE, add=TRUE)
plot.decay(BCI.decay.pow, col="blue", remove.dots=TRUE, add=TRUE)
# }

Run the code above in your browser using DataLab