Question: Help! "Error in read.dta("sample.dta") : negative length vectors are not allowed"
0
gravatar for shengfengwang456
2.6 years ago by
shengfengwang4560 wrote:

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.2k views
ADD COMMENTlink modified 2.6 years ago by Medhat8.2k • written 2.6 years ago by shengfengwang4560
0
gravatar for Medhat
2.6 years ago by
Medhat8.2k
Texas
Medhat8.2k wrote:

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 COMMENTlink modified 2.6 years ago • written 2.6 years ago by Medhat8.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2055 users visited in the last hour