Functions for calculating Ripley's K from CTFS R Analytical Tables, many routines for quadrat-based calculations. and calculations of wavelet variance.
|View File Source||Download File||No help file available|
Function Description: NDcountCalculates the count of neighbors within radius r with edge effect correction. Is a quick version of NeighborDensities with limited capabilities.
Dependencies: CalcRingArea from the CTFS package and splancs.
Output: a single vector with neighbor counts within radius r for each individual in censdata.
Author: Tania Brenes
- censdata: Is the coordinates dataset, should have the coordinates (gx, gy)
- r (20): radius
- plotdim (c(1000,500)): vector with two numbers indicating the xy-plot size;
count all the consp neighbors of one species
> one.sp = subset(bci.full7, sp=="ingasa" & status=="A")
> neighbor.counts <- NDcount(one.sp)
sppi.pts <- with(censdata, data.frame(gx,gy))
areas <- CalcRingArea(sppi.pts, r, plotdim)$each
counts <- khat(sppi.pts, poly=poly,r, newstyle=TRUE)$counts
output = counts * pi * r^2 /areas