title: calculate ratios for every 2 columns in a data frame
body: <p>I'm new to R, so this question maybe very simple to many of you. I have a data frame with 1000 columns, and 1000 rows, a bit like the follow</p>
  
  <pre><code>id  S1  S2  S3  S4  S5  S6
  A1  2   7   9   56  34  23
  A2  3   5   11  4   8   56
  A3  8   22  32  45  67  76
  A4  4   21  23  1   34  43
  A5  6   12  5   19  36  46
  A6  45  89  76  87  75  78
  A7  45  71  56  65  34  87
  A8  26  76  67  87  65  65
  </code></pre>
  
  <p>I'd like to get the ratio of column 1/2, column 3/4, ...column 999/1000, and then put in a matrix. I tried using "for" to do it, but never succeeded. Anyone can help me on this? Thank you.</p>