Skip to content

Reading large SAS dataset in R

3 messages · Santanu Pramanik, Phil Spector, Abhijit Dasgupta

#
Santanu -
    If you have sas installed on your computer, you may find using
the sas.get function of the Hmisc package useful.
    If the only message that read.ssd produced was "Sas failed", it
would be difficult to figure out what went wrong.   Usually the 
location of the log file, which would explain the error more 
thoroughly, is included in the error message.

 					- Phil Spector
 					 Statistical Computing Facility
 					 Department of Statistics
 					 UC Berkeley
 					 spector at stat.berkeley.edu
On Wed, 5 Jan 2011, Santanu Pramanik wrote:

            
#
Santanu, 

I second Phil's suggestion. sas.get is actually quite nice. 

Another current option is using a command-line utility called dsread (http://www.oview.co.uk/dsread/) to convert the sas7bdat file to a csv or tsv format, which can then easily be read into R using read.table and its derivatives. Frank Harrell (author of the Hmisc package) commented positively on this approach on the list a couple of months back. 

Abhijit
On Jan 5, 2011, at 5:51 PM, Phil Spector wrote: