Topic: Species Area

Topic Description:

Functions for calculating species-area curves based on square or rectangular quadrats, using standard R Analytical Tables.



File: speciesarea/spparea.r

View File Source Download File No help file available

Function: graph.quadrats

Function Description: graph.quadrats

Make a graph of a series of quadrats whose corners are given by the rows of coord: xlo, ylo, xhi, yhi. This is used in illustrating randomly selected quadrats.

Function Arguments:

ArgumentDefault Value
coord
plotdimc(1000,500)
clr"black"
addFALSE

Function Source:

graph.quadrats=function(coord,plotdim=c(1000,500),clr="black",add=FALSE)
{
aspect=plotdim[2]/plotdim[1]
oldpar=par(pin=c(5,5*aspect))

xlo=coord[,1]
ylo=coord[,2]
xhi=coord[,3]
yhi=coord[,4]

if(!add) plot(xlo,ylo,xlim=c(0,plotdim[1]),ylim=c(0,plotdim[2]),pch=16,cex=.5,col="white")
segments(xlo,ylo,xlo,yhi,col=clr)
segments(xlo,yhi,xhi,yhi,col=clr)
segments(xhi,yhi,xhi,ylo,col=clr)
segments(xhi,ylo,xlo,ylo,col=clr)

par(oldpar)
}