adaptive.density(X, f = 0.1, ..., nrep = 1)"ppp").as.im determining the
    pixel resolution of the result."im") whose values are
  estimates of the intensity of X.density.ppp. It
  computes an estimate of the intensity function of a point pattern
  dataset.  The dataset X is randomly split into two patterns A and
  B containing a fraction f and 1-f, respectively,
  of the original data. The subpattern A is used to construct a
  Dirichlet tessellation (see dirichlet). The subpattern
  B is retained for counting. For each tile of the Dirichlet
  tessellation, we count the number of points of B falling in the
  tile, and divide by the area of the same tile, to obtain an estimate
  of the intensity of the pattern B in the tile.
  This estimate is divided by 1-f to obtain an estimate
  of the intensity of X in the tile. The result is a pixel image
  of intensity estimates which are constant on each tile of the tessellation.
  If nrep is greater than 1, this randomised procedure is
  repeated nrep times, and the results are averaged.
This technique has been used by Ogata et al. (2003), Ogata (2004) and Baddeley (2007).
Ogata, Y. (2004) Space-time model for regional seismicity and detection of crustal stress changes. Journal of Geophysical Research, 109, 2004.
Ogata, Y., Katsura, K. and Tanemura, M. (2003). Modelling heterogeneous space-time occurrences of earthquake and its residual analysis. Applied Statistics 52 499--509.
density.ppp,
  dirichlet,
  im.object.data(nztrees)
  plot(adaptive.density(nztrees))Run the code above in your browser using DataLab