title: R using diff: non-numeric argument to binary operator error
body: <p>We parse a CSV-File with some numbers with the following command:</p>
  
  <pre><code>tt &lt;- read.table("test2.csv",sep=";",stringsAsFactors=FALSE)
  </code></pre>
  
  <p>And it works. Printing<code>tt[1,]</code> yields a nice vector and <code>sd(tt[1,])</code> is sensible.</p>
  
  <p>However, when we try</p>
  
  <pre><code>diff(tt[1,])
  </code></pre>
  
  <p>The command-line returns the error:</p>
  
  <pre><code>Error in r[i1] - r[-length(r):-(length(r) - lag + 1L)] :
      non-numeric argument to binary operator error
  </code></pre>
  
  <p>Why is that? Any ideas?</p>