This low-level function calculates estimates of
  the cumulative distribution function
  $$F(r) = P(D \le r)$$
  of a distance variable \(D\), given a vector of observed values of
  \(D\) and other information.
  Examples of this concept include the empty space distance function
  computed by Fest and the nearest-neighbour distance
  distribution function Gest.
This function compileCDF
  and its siblings compileK and compilepcf
  are useful for code development and for teaching,
  because they perform a common task, and do the housekeeping required to
  make an object of class "fv" that represents the estimated
  function. However, they are not very efficient.
The argument D should be a numeric vector of shortest distances
  measured from each ‘query’ point to the ‘target’ set.
  The argument B should be a numeric vector of shortest distances
  measured from each ‘query’ point to the boundary of the window
  of observation.
  All entries of D and B should be non-negative.
compileCDF calculates estimates of the cumulative distribution
  function \(F(r)\) using the border method (reduced sample
  estimator), the Kaplan-Meier estimator and, if han.denom is
  given, the Hanisch-Chiu-Stoyan estimator.
  See Chapter 8 of Baddeley, Rubak and Turner (2015).
The result is an object of class "fv" representing the
  estimated function.
  Additional columns (such as a column giving the theoretical
  value) must be added by the user, with the aid of
  bind.fv.