Given a list of Dirichlet tiles, as produced by tile.list(), produces a data frame consisting of the centroids of those tiles.
tile.list()
tile.centroids(xxx)
A list of the tiles (produced by tile.list()) in a Dirichlet tessellation of a set of planar points.
A data frame with two columns named x and y. Each row of this data frame consitutes the centroid of one of the Dirichlet tiles.
x
y
URL http://en.wikipedia.org/wiki/Centroid
# NOT RUN { set.seed(42) x <- runif(20) y <- runif(20) d <- deldir(x,y) l <- tile.list(d) g <- tile.centroids(l) # } # NOT RUN { plot(l,close=TRUE) points(g,pch=20,col="red") # }
Run the code above in your browser using DataCamp Workspace