Library: | spatial |
See also: | SPPPinit SPPPinitrandom SPPPsetregion SPPPgetregion SPPPpsim SPPPstrauss SPPPssi SPPPkenvl SPPPkaver |
Quantlet: | SPPPkfn | |
Description: | computes K-fn of a point pattern. Actually, it computes L = sqrt(K / pi). Note that SPPPinit or SPPPsetregion must have been called before. |
Usage: | res = SPPPkfn(pp, fs, k) | |
Input: | ||
pp | list, (of type "PP") calculated by SPPPinit | |
fs | scalar, full scale of the plot | |
k | scalar, number of regularly spaced distances in (0, fs) | |
Output: | ||
res | list, consisting of components x, y, k, dmin and lm: | |
res.x | n x 1 vector, distances | |
res.y | n x 1 vector, L-fn values | |
res.k | scalar, number of distances returned (which may be less than input k if fs is too large) | |
res.dmin | scalar, minimum distance between a pair of points | |
res.lm | scalar, maximum deviation from L(t) = t |
; loads the spatial statistics library library("spatial") ; reads a spatial data set pines = read("pines.dat") ; initializes a point process pinesobj = SPPPinit(pines, 0, 96, 0, 100, 10) ; calculates K-fn in interval(0, 5), split into 100 segments ppkfn = SPPPkfn(pinesobj, 5, 100) ppkfn.y ppkfn.lm
Returns the L-fn for a point pattern, including some of its major characteristics. Contents of y [ 1,] 0 [ 2,] 0 [ 3,] 0 [ 4,] 0 [ 5,] 0.11477 ... [ 99,] 5.0106 [100,] 5.0488 Contents of lm [1,] 0.30359