title: Test whether one factor is nested in another
body: <p>Is there an easy way to determine if one vector is <em>nested</em> within another? In other words, in the example below, each value of <code>bar</code> is associated with one and only one value of <code>foo</code>, so <code>bar</code> is nested within <code>foo</code>.</p>
  
  <pre><code>data.frame(foo=rep(seq(4), each=4), bar=rep(seq(8), each=2))
  </code></pre>
  
  <p>To clarify, here is the desired result:</p>
  
  <pre><code>foo &lt;- rep(seq(4), each=4)
  bar &lt;- rep(seq(8), each=2)
  qux &lt;- rep(seq(8), times=2)
  # using a fake operator for illustration:
  bar %is_nested_in% foo  # should return TRUE
  qux %is_nested_in% foo  # should return FALSE
  </code></pre>