title: Subtract a column in a dataframe from many columns in R
body: <p>I have a dataframe.   I'd like to subtract  the 2nd column from all other columns.  I can do it in a loop, but I'd like to do it in one call.   Here's my working loop code:</p>
  
  <pre><code>df &lt;- data.frame(x = 100:101, y = 2:3,z=3:4,a = -1:0,b=4:5)
  
  for( i in 3:length(df) ) {
      df[i] &lt;- df[i] - df[2]
  }
  </code></pre>