title: How to deal with "negative length vectors are not allowed" for R input
body: <p>I want to input a stata version data set (<code>sample.dta</code>) with almost 60000 SNPs information (as columns) in to R. This data set was created with SAS. I used the code: </p>
  
  <pre><code>data &lt;- read.dta("sample.dta")
  </code></pre>
  
  <p>But it doesn't work and the error message is:</p>
  
  <blockquote>
    <p>"Error in read.dta("sample.dta") : negative length vectors are not allowed".</p>
  </blockquote>
  
  <p>But when I try another data set with no more than 25000 SNPs, it works.</p>
  
  <p>So I don't know whether some people have been faced with similar problem? 
  And what is the exact reason for this error? And how do you deal with it before?</p>
  
  <p>I really hope the experts in R could help me figure out it. Thank you so much.</p>