voronoi | R Documentation |
voronoi
generates n
Voronoi tiles (also known as Thiessen polygons)
within a polygon using Delaunay triangulation. It is essentially a wrapper
for deldir::deldir()
which outputs a tidy sf
object.
voronoi(frame, n, warn_multipart = TRUE)
frame |
An |
n |
Desired number of Voronoi tiles; as long as |
warn_multipart |
Logical. Set |
An sf
object containing polygon geometries and an integer unique id
.
frame <- rpolygon()
tiles <- voronoi(frame, 50)
plot(tiles)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.