title: Getting the excluded elements for each of the combn(n,k) combinations
body: <p>Suppose we have generated a matrix <code>A</code> where each column contains one of the combinations of <code>n</code> elements in groups of <code>k</code>. So, its dimensions will be <code>k,choose(n,k)</code>. Such a matrix is produced giving the command <code>combn(n,k)</code>. What I would like to get is another matrix <code>B</code> with dimensions <code>(n-k),choose(n,k)</code>, where each column <code>B[,j]</code> will contain the excluded <code>n-k</code> elements of <code>A[,j]</code>.  </p>
  
  <p>Here is an example of the way I use tho get table <code>B</code>. Do you think it is a safe method to use? Is there another way?</p>
  
  <pre><code>n &lt;- 5 ; k &lt;- 3
  (A &lt;- combn(n,k))
  (B &lt;- combn(n,n-k)[,choose(n,k):1])
  </code></pre>
  
  <p>Another example</p>
  
  <pre><code>x&lt;-c(0,1,0,2,0,1) ; k&lt;- 4
  (A &lt;- combn(x,k))
  (B &lt;- combn(x,length(x)-k)[,choose(length(x),k):1])
  </code></pre>
  
  <p>That <a href="https://stackoverflow.com/questions/2487922/r-how-can-i-get-the-complement-of-vector-y-in-vector-x">previous question</a> of mine is part of this problem.<br>
  Thank you.</p>