I cannot seem to find how the search distance “r” is calculated in the R Kest function (spatstat). The package documentation states the following:
r Optional. Vector of values for the argument r at which K(r) should
be evaluated. Users are advised not to specify this argument; there is
a sensible default.
What is the “sensible default” used in the calculation? Any documentation would be greatly appreciated.
Because
Ris open source you can read the code yourself. TypingKestlists the code. Finding whereris assigned shows it is done by a subroutine calledhandle.r.b.args. Type its name at theRprompt to read the procedure–it’s only a half dozen lines:Evidently an estimate of the diameter of the region is divided by 512.