[R] Reading sas7bdat files directly
Frank E Harrell Jr
f.harrell at Vanderbilt.Edu
Fri Feb 5 04:16:17 CET 2010
David Winsemius wrote:
> On Feb 4, 2010, at 5:31 PM, Alex Bryant wrote:
>> Hi, I have a need to process (in real-time) a large number of
>> .sas7bdat files from within R. The problem is I don't want to convert
>> these files to .xpt (transport) every time. So just checking if
>> anyone has a (viable) way to read .sas7bdat files directly into R?
> I believe (on the basis of what is written on the NCHS/NHANESwebsite)
> that if you are a Windows user, which I am only under duress, you can
> get at such data with a free product that SAS makes available:
> Whether that product can be called as a system() executable with
> arguments, I have no idea.
The SAS viewer has a pretty pathetic data export feature that won't even
produce valid csv files if you have any unmatched quotes in character
variables. I don't think it's very good about exporting metadata either.
Frank E Harrell Jr Professor and Chairman School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help