Last data update: 2014.03.03

R: Dividing chain; default method.
divchain.defaultR Documentation

Dividing chain; default method.

Description

Create the “dividing chain” of the Dirchlet tesselation of a given set of points having distinguishing (categorical) “weights”. This dividing chain consists of those edges of Dirichlet tiles which separate points having different values of the given weights.

Usage

  ## Default S3 method:
divchain(x, y, z, ...)

Arguments

x,y

These provide the coordinates of the set of points being tesselated. Argument x may be a data frame or a list, in particular one of class ppp. (See the spatstat package.) For a full description see the discussion of these arguments in the help for deldir().

z

A factor specifying “auxiliary” values or “weights” If this argument is left NULL then it is extracted, if possible, from the components of x. See deldir() for further details.

...

Other arguments to be passed to deldir.

Value

An object of class divchain. See divchain.deldir() for details.

Note

This function was created in response to a question asked on stackoverflow.com by a user named “Dan”.

Author(s)

Rolf Turner r.turner@auckland.ac.nz

See Also

divchain.deldir() deldir() plot.divchain()

Examples

   set.seed(42)
   x    <- runif(50)
   y    <- runif(50)
   z    <- factor(kmeans(cbind(x,y),centers=4)$cluster)
   dcxy <- divchain(x,y,z,rw=c(0,1,0,1))

Results