Learn R Programming

spatial (version 7.3-5)

Kfn: Compute K-fn of a Point Pattern

Description

Actually computes $L = \sqrt{K/\pi}$.

Usage

Kfn(pp, fs, k=100)

Arguments

pp
a list such as a pp object, including components x and y
fs
full scale of the plot
k
number of regularly spaced distances in (0, fs)

Value

  • A list with components
  • xvector of distances
  • yvector of L-fn values
  • knumber of distances returned -- may be less than k if fs is too large
  • dminminimum distance between pair of points
  • lmmaximum deviation from L(t) = t

Details

relies on the domain D having been set by ppinit or ppregion.

References

Ripley, B. D. (1981) Spatial Statistics. Wiley. Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.

See Also

ppinit, ppregion, Kaver, Kenvl

Examples

Run this code
towns <- ppinit("towns.dat")
par(pty="s")
plot(Kfn(towns, 10), type="s", xlab="distance", ylab="L(t)")

Run the code above in your browser using DataLab