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: gxgy.to.hectindex
Function Description: gxgy.to.hectindex
Function Arguments:
| Argument | Default Value |
|---|---|
| gx | |
| gy | |
| plotdim | c(1000,500) |
Function Source:
gxgy.to.hectindex=function(gx,gy,plotdim=c(1000,500))
{
if(gx>=plotdim[1] || gy>=plotdim[2] || gx<0 || gy<0) return(rep(-1,length(index)))
else
{
ha.rowno=floor(gy/100)
ha.colno=floor(gx/100)
max.ha.row=plotdim[2]/100
return(ha.colno*max.ha.row+ha.rowno+1)
}
}
{
if(gx>=plotdim[1] || gy>=plotdim[2] || gx<0 || gy<0) return(rep(-1,length(index)))
else
{
ha.rowno=floor(gy/100)
ha.colno=floor(gx/100)
max.ha.row=plotdim[2]/100
return(ha.colno*max.ha.row+ha.rowno+1)
}
}