title: Delete coordinate pairs common to 2 separate data frames (R)?
body: <p>I'm trying to  get the coords common to two different dataframes (<code>nodes</code> and <code>poly</code>)removed from the <code>nodes</code> data frame. The code below works if the coordinates line up element-wise, but not otherwise.    </p>
  
  <pre><code>v1 &lt;- c(2, 2, 4)
  v2 &lt;- c(9, 2, 7)
  nodes &lt;- data.frame(v1, v2)
  
  v3 &lt;- c(4, 1, 2)
  v4 &lt;- c(3, 2, 2)
  poly &lt;- data.frame(v3, v4)
  
  newnodes &lt;- nodes[-which(nodes[,1:2] == poly[,1:2]), ]
  </code></pre>
  
  <p>How can I achieve this? Desired output for <code>nodes</code> is:</p>
  
  <pre><code>  v1 v2
     2  9
     4  7
  </code></pre>