title: Breaking a grid into 50 square subunits in R using x y coordinates
body: <p>I have data with X-Y coordinates on a rectangular grid</p>
  
  <pre><code>dX &lt;- runif(1000,0, 500)
  dY &lt;- runif( 500,0, 500)
  d &lt;- data.frame(dX, dY)
  </code></pre>
  
  <p>I want to assign 50 'plot numbers' to this data, such that anything between 0-100 <code>dX</code> and 0-100 <code>dY</code> is plot 1. anything between 100-200 <code>dX</code> and 1000-200 <code>dY</code> is plot 2. Etc. I can imagine writing 50 lines of code to do this, but I would really prefer to write 1! </p>