deldir (version 0.1-16)

divchain: Dividing chain; generic.

Description

Generic function for creating the “dividing chain” of a Dirchlet tesselation. The tessellation must have been created from a set of points having associated categorical “weights”. The dividing chain consists of those edges of Dirichlet tiles which separate points having different values of the given weights.

Usage

divchain(x, ...)

Arguments

x

Either an object specifying coordinates or an object of class “deldir”.

Arguements to be passed to the appropriate method for this generic function.

Value

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

Details

If x is a (numeric) vector it will be taken to be the “x” coordinates of the points being tessellated. In this case the …\ arguments must contain a vector y specifying the “y” coordinates. The …\ arguments must also contain a factor z specifying the relevant “weights” argument. The argument x may also be a data frame or list from which the coordinates and the weights will be extracted. See divchain.default() for details.

If x is an object of class class “deldir” then it must have been created with an appropriate (factor) “weights” argument, otherwise an error is given.

See Also

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

Examples

Run this code
# NOT RUN {
   set.seed(42)
   x   <- runif(50)
   y   <- runif(50)
   z   <- factor(kmeans(cbind(x,y),centers=4)$cluster)
   dc1 <- divchain(x,y,z,rw=c(0,1,0,1))
   dxy <- deldir(x,y,z=z,rw=c(0,1,0,1))
   dc2 <- divchain(dxy)
# }

Run the code above in your browser using DataCamp Workspace