title: Substraction of two columns
body: <p>I really can't understand when I am able to use a different functions. I always have the same problem... "it's not vaild for atomic vectors, dataframes, matrices... etc. </p>
  
  <p>Can someone explain me how I can substract two columns of matrix or data.frame or anything...</p>
  
  <p>That's my data:</p>
  
  <pre><code>id  cond    S1.pre  S2.pre  S1.post S2.post V1.pre  V2.pre  V1.post V2.post
    1 aer       21    31        25    35         7     1        19     4
    2 aer       15    26        21    29        13    11        16    14
    3 aer       18    27        23    31         8     2         3     3
    4 aer       17    31        18    39        13    11        15    14
    5 aer       15    26        16    29        26    15        32    20
  </code></pre>
  
  <p>I want to substract the column S1.post - S1.pre.</p>
  
  <p>That's what I tried:</p>
  
  <pre><code>&gt; diff &lt;- data[,"S1.post"] - data[,"S1.pre"]
  Error in data[, "S1.post"] - data[, "S1.pre"] : 
  non-numeric argument to binary operator
  &gt; diff &lt;- data$S1.post - data$S1.pre
  Error in data$S1.post : $ operator is invalid for atomic vectors
  </code></pre>
  
  <p>Classes: </p>
  
  <pre><code>&gt; class("S1.pre")
  [1] "character"
  
  &gt; class("data")
  [1] "character"
  </code></pre>