title: Possible combinations of a vector with respect order
body: <pre><code>x &lt;- letters[1:4]
  x
  # [1] "a" "b" "c" "d"
  
  t(combn(x, 2))
  #   [,1] [,2]
  # [1,] "a"  "b" 
  # [2,] "a"  "c" 
  # [3,] "a"  "d" 
  # [4,] "b"  "c" 
  # [5,] "b"  "d" 
  # [6,] "c"  "d" 
  </code></pre>
  
  <p>How should I write the code if I also what inverse combinations with b-a, c-a...d-c. 12 combinations in total. </p>