Help! "Error in read.dta("sample.dta") : negative length vectors are not allowed"
1
0
Entering edit mode
7.8 years ago

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 • 2.9k views
ADD COMMENT
0
Entering edit mode
7.8 years ago
Medhat 9.7k

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

ADD COMMENT

Login before adding your answer.

Traffic: 3173 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6