This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Help! "Error in read.dta("sample.dta") : negative length vectors are not allowed"

Sorry to trouble everyone. I want to input a stata version data set (sample.dta) with almost 60000 SNPs information (as columns) in to R. This data set was created with SAS. I used the code: data<-read.dta("sample.dta")

but it doesn't work and the error message is "Error in read.dta("sample.dta") : negative length vectors are not allowed".

But when I try another data set with no more than 25000 SNPs, it works.

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?

I really hope the experts in R could help me figure out it. Thank you so much.

Bests,

Shengfeng

r

1 answer

looks like you've hit the memory limit, what R version you use? assuming that it is a memory issue that could help, The ff package is a great and efficient way of working with large datasets. ff: memory-efficient storage of large data on disk and fast access functions

tutorial can be found here

Log in to answer this question.