title: How can I link Voronoi projection points back to original metadata use to create projection?
body: <p>I'm using the <code>deldir</code> package to calculate the Voronoi projection of a set of coordinates.</p>
  
  <p>This working great, and I've been able to construct the plot, but I need to relate the calculated points back to the original data set that has additional metadata for each coordinate pair.</p>
  
  <p>Basically, I need a polygon ID that I can match back to my original data. So for example if coordinate pair #1 is projected as a five-sided polygon, I need to assign polygon ID = 1 to each of those five line segments so I can merge in the metadata.</p>
  
  <p>Example with dummy data:</p>
  
  <pre><code>require(deldir)
  
  set.seed(21)
  
  x &lt;- rnorm(500, 0, 1.5)
  y &lt;- rnorm(500, 0, 1)
  
  df1 &lt;- data.frame(x,y,ID=seq(1,500,1))
  
  vtess &lt;- deldir(df1$x, df1$y)
  </code></pre>
  
  <p>So for <code>df1[1,]</code>, I need to know every value that was generated in <code>vtess</code>.</p>
  
  <p>The ID for <code>df1[1,]</code> = 1, so I'm trying to create a column where <code>vtess$polygonID</code> = 1 for every segment generated by <code>df1[1,]</code> and so on.</p>
  
  <p>Any help would be fantastic</p>