Topic: Spatial

Topic Description:

Functions for calculating Ripley's K from CTFS R Analytical Tables, many routines for quadrat-based calculations. and calculations of wavelet variance.



File: spatial/quadfunc.r

View File Source Download File No help file available

Function: neighbors

Function Description: neighbors

Finds proportion of neighboring quadrats in which a species is present. The input vector is presence-absence for every quadrat. It returns a vector of the same length.

Function Arguments:

ArgumentDefault Value
pres
plotdimc(1000,500)

Function Source:

neighbors=function(pres,plotdim=c(1000,500))
{
colno=plotdim[1]/20
rowno=plotdim[2]/20
totalquads=colno*rowno
neigh=numeric()

for(i in 1:totalquads)
{
neigh.quads=findborderquads(i,plotdim=plotdim)
neigh[i]=sum(pres[neigh.quads])/length(neigh.quads)
}

return(neigh)
}