tile.centroids {deldir} | R Documentation |
Compute centroids of Dirichlet (Voronoi) tiles
Description
Given a list of Dirichlet tiles, as produced by tile.list()
,
produces a data frame consisting of the centroids of those tiles.
Usage
tile.centroids(tl)
Arguments
tl |
A list of the tiles (produced by |
Value
A data frame with two columns named x
and y
.
Each row of this data frame constitutes the centroid of one
of the Dirichlet tiles.
Author(s)
Rolf Turner rolfurner@posteo.net
References
URL http://en.wikipedia.org/wiki/Centroid
See Also
Examples
set.seed(42)
x <- runif(20)
y <- runif(20)
d <- deldir(x,y)
l <- tile.list(d)
g <- tile.centroids(l)
plot(l,close=TRUE)
points(g,pch=20,col="red")
[Package deldir version 2.0-4 Index]