[R] voronoi tessellations
murdoch at stats.uwo.ca
Wed Jul 19 22:32:43 CEST 2006
On 7/19/2006 4:21 PM, binabina at bellsouth.net wrote:
> Okay, been working with tripack, seems the most mature package for this. Got it to work well with their test data set - data(tritest). When i tried random numbers to explore further, i am getting some results that don't reconcile.
> example run this:
> y <- runif(100)
> x <- runif(100)
> vm <- voronoi.mosaic(x,y)
Don't do that! That throws away the coordinate system that has already
been established. Do it this way:
y <- runif(100)
x <- runif(100)
vm <- voronoi.mosaic(x,y)
and if you want the axes,
> when you look at the plot of the mosaic overlayed with the raw data, the mosaic should have each data point in 1 cell, however that is not the case - any help would be appreciated.
> However if you run
> x <- tritest$x
> y <- tritest$y
> vm <- voronoi.mosaic(x,y)
> it looks at it should.
>> From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
>> Date: 2006/07/19 Wed AM 03:15:51 EDT
>> To: Don MacQueen <macq at llnl.gov>
>> CC: zubin <binabina at bellsouth.net>, r-help at stat.math.ethz.ch
>> Subject: Re: [R] voronoi tessellations
>> On Tue, 18 Jul 2006, Don MacQueen wrote:
>>> I'll suggest going to the CRAN packages page and doing a search for "voronoi".
>> The problem here is that `Voronoi tessellation' is a secondary name. The
>> concept has many names, including Dirichlet tessellation and Thiessen
>> polygons, and Dirichlet has priority over Voronoi.
>>> Also, search for 'triangulation', since that is one of the uses of them.
>> I know of packages deldir, tripack and perhaps geometry.
>>> At 11:46 PM -0400 7/18/06, zubin wrote:
>>>> Hello, looking to draw a voronoi tessellations in R - can anyone
>>>> recommend a package that has tackled this?
>>>> some background:
>>>> i have a economic data set and created a sammons projection, like to now
>>>> overlay a voronoi tessellation over the sammons 2-D solution for a slick
>>>> visual, and potentially color each tessellation element based on a metric.
>>>> home.u <- unique(home1)
>>>> home.dist <- dist(home.u)
>>>> home.sam <- sammon(home.dist,k=2)
>> Wait a minute. If this is sammon() from MASS (uncredited), it is not a
>> projection, and there is no relevant concept of distance between points in
>> the mapped space apart from between the supplied points.
>> I suggest Zubin reads carefully the reference whose support software he
>> appears to be using. (It would also have answered his question.)
>> Brian D. Ripley, ripley at stats.ox.ac.uk
>> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
>> University of Oxford, Tel: +44 1865 272861 (self)
>> 1 South Parks Road, +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK Fax: +44 1865 272595
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help