title: How to compare all possible combinations of objects in R by loop
body: <p>Suppose I have binary vectors and need to compare their similarily with <code>Kappa</code> function.</p>
  
  <pre><code>library(asbio)
  A &lt;- c(0,1,1,1,1,1,0)
  B &lt;- c(0,0,1,0,1,0,1)
  C &lt;- c(1,0,0,1,1,0,0)
  D &lt;- c(1,1,0,0,0,1,1)
  E &lt;- c(1,0,0,1,1,0,1)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/pvG59.png" alt="enter image description here"></p>
  
  <pre><code>Kappa(A,B)$ttl_agreement    # 42%
  </code></pre>
  
  <p>How to loop <code>Kappa</code> function to get table of <strong>all possible comparisons</strong>?</p>
  
  <p>I would like to get something like this:</p>
  
  <pre><code>    A   B   C   D   E
  A 100  42   -   -   -
  B  42 100   -   -   -
  C   -   - 100   -   -
  D   -   -   - 100   -
  E   -   -   -   - 100
  </code></pre>