View source: R/tile.centroids.R
tile.centroids | R Documentation |
Given a list of Dirichlet tiles, as produced by tile.list()
,
produces a data frame consisting of the centroids of those tiles.
tile.centroids(tl)
tl |
A list of the tiles (produced by |
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.
URL http://en.wikipedia.org/wiki/Centroid
tile.list()
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.