title: unique values of one column for unique values of another column
body: <p>Consider following sample data frame.</p>
  
  <pre><code>&gt; ww
    col1 col2
  1    1    A
  2    2    A
  3    3    A
  4    4    B
  5    5    B
  6    6    B
  7    7    C
  8    8    C
  9    9    C
  &gt; dput(ww)
  structure(list(col1 = c(1, 2, 3, 4, 5, 6, 7, 8, 9), col2 = structure(c(1L, 
  1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L), .Label = c("A", "B", "C"), class = "factor")), .Names = c("col1", 
  "col2"), row.names = c(NA, -9L), class = "data.frame")
  </code></pre>
  
  <p>I want to know if each category of <code>col2</code> has different values in <code>col1</code> or not. In the end, I want to get an answer (TRUE or FALSE). TRUE (if all categories of <code>col2</code> have completely different sets of values in <code>col1</code>), and FALSE (if there exists atleast 2 categories in <code>col2</code> which have atleast 1 value in <code>col1</code> common.</p>
  
  <p>For above example, answer is TRUE since categories A, B and C don't have any value of <code>col1</code> for them common. Values of <code>col1</code> are 1,2,3 for A. Values of <code>col1</code> are 4,5,6 for B. Values of <code>col1</code> are 7,8,9 for C.</p>
  
  <p>I can try splitting data the data frame by <code>col2</code> and then saving values of <code>col1</code> for each member then check for common values using <code>intersect</code> but that is kind of lengthy and inefficient process for a large data frame. Can somebody provide me with an efficient solution? Any data table solution would also do.</p>