title: how to check if a vector of non-integers numbers is an arithmetic series in R
body: <p>I have a vector of non-integers numbers and I want to check if the vector is an arithmetic series. here is my code:</p>
  <pre><code>x=c(5,8.1,11.2,14.3)
  is.sequential &lt;- function(x){
      return (all(diff(x) == diff(x)[1]))
    }
  is.sequential(x)
  </code></pre>
  <p>but I get <strong>False</strong> for this vector. whats wrong with this code? thanks</p>