Skip to content
Back to formatted view

Raw Message

Message-ID: <59BCB7CFDB5BBB4E8FA26956BC3B1D42110C49E9@IU-MSSG-MBX102.ads.iu.edu>
Date: 2013-11-19T21:40:30Z
From: Li, Xiaochun
Subject: Does function read.sas7bdat() have some memory limitations?

Dear R-ers,

I was trying to read in a large sas7bdat file (size 148094976 bytes) using 'read.sas7bdat()', but it did not read in the data correctly.  E.g., the first 5 rows will come out like this (I'm omitting other columns to keep it readable):

       PERSON_ID           age
1  5.399114e-315 5.329436e-315
2  5.399114e-315 5.328302e-315
3  5.399114e-315 5.332026e-315
4  5.399114e-315 5.329112e-315
5  5.399114e-315 5.331055e-315

If I reduced the original sas dataset to the first 5 rows, 'read.sas7bdat' read them in correctly:

  PERSON_ID age
1    612569  55
2    612571  48
3    612580  78
4    612606  53
5    612617  66

So for now I first saved the sas dataset as .csv, then read using 'read.csv', everything is fine.  

Any suggestion why 'read.sas7bdat' didn't work, and if some fix in its code can make it work?

Thank  you.
_____________________________ 
Xiaochun Li, Ph.D. 
Department of Biostatistics 
Indiana University 
School of Medicine and
Richard M. Fairbanks School of Public Health