title: Creating a matrix from a list of pairwise comparisons
body: <p>somebody was nice enough to give me a solution from my first problem (using a function on 
  pairwise "all vs all" combinations of a collection of matrices):</p>
  
  <pre><code>library(vegan)
  #by Akrun
  
  A &lt;- matrix(sample.int(100, size = 50*50, replace = TRUE), nrow = 50, ncol = 50)
  B &lt;- matrix(sample.int(100, size = 50*50, replace = TRUE), nrow = 50, ncol = 50)
  C &lt;- matrix(sample.int(100, size = 50*50, replace = TRUE), nrow = 50, ncol = 50)
  
  Obj1 &lt;- vegdist(decostand(A,"standardize",MARGIN=2), method="euclidean")
  Obj2 &lt;- vegdist(decostand(B,"standardize",MARGIN=2), method="euclidean")
  Obj3 &lt;- vegdist(decostand(C,"standardize",MARGIN=2), method="euclidean")
  
  
  names1 &lt;- ls(pattern="Obj")
  Cmb1 &lt;- combn(names1, 2)
  lapply(split(Cmb1, col(Cmb1)), function(x) unlist(mantel(get(x[1]), get(x[2]))[3:4]))
  </code></pre>
  
  <p>This results in a list of results, for example: </p>
  
  <pre><code>$`1`
   statistic     signif 
  0.03006202 0.4070000
  </code></pre>
  
  <p>There are two questions:</p>
  
  <ol>
  <li><p>Can i write the two names of the compared objects into the line with "$"? With </p>
  
  <p>split(Cmb1, col(Cmb1)</p></li>
  </ol>
  
  <p>the names can be obtained.</p>
  
  <ol start="2">
  <li>Even better, is it possible to somehow create a matrix with n rows and columns for n objects and fill it statistic values?</li>
  </ol>
  
  <p>Thank you for taking your time.</p>