title: quickest way in R to check that all columns are identical
body: <p>Suppose I have a matrix with 3 columns</p>
  
  <pre><code>10             10                       10
  8              8                        8
  9              9                        9
  7              7                        7
  5              5                        5
  4              4                        4
  3              3                        3
  6              6                        6
  2              2                        2
  1              1                        1
  </code></pre>
  
  <p>What would be the fastest way to check that all the columns are identical? I can do something like <code>all</code> or <code>identical</code> to check any two and then keep collapsing with the next set but is there anything more clever?</p>
  
  <p>Ideally, I would like a solution that is independent of the number of columns.</p>