Re: [R] Read SAS data into R

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Thu, 10 May 2007 15:45:14 -0500

John Kane wrote:

> Have a look at the Hmisc package:sas.get or
> sasxport.get.  In either case you need to have a
> working SAS installation on the same machine. 
> 
> Another way, although you lose label is simply to
> export the SAS data file as a csv or delim file and
> import it.

I'm also looking into running the SAS Viewer under wine on linux to read non-transport SAS files in a new Hmisc function. But so far there is a problem - SAS in all its wisdom doesn't quote character string output when creating csv files with the Viewer, so you can't have commas in your character strings. There is a tab delimiter option as long as you don't have tabs in the strings. Amazing that SAS couldn't do better than that.

Frank

> 
> 
> --- AbouEl-Makarim Aboueissa
> <aaboueissa_at_usm.maine.edu> wrote:
> 

>> Dear ALL:
>>
>> Could you please let me know how to read SAS data
>> file into R.
>>
>> Thank you so much for your helps.
>>
>> Regards;
>>
>> Abou
>>
>>
>> ==========================
>> AbouEl-Makarim Aboueissa, Ph.D.
>> Assistant Professor of Statistics
>> Department of Mathematics & Statistics
>> University of Southern Maine
>> 96 Falmouth Street
>> P.O. Box 9300
>> Portland, ME 04104-9300
>>
>> Tel: (207) 228-8389
>> Email: aaboueissa_at_usm.maine.edu
>> aboueiss_at_yahoo.com
>> Office: 301C Payson Smith
>>
>> ______________________________________________
>> R-help_at_stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained,
>> reproducible code.
>>
> 
> ______________________________________________
> R-help_at_stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 


-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 11 May 2007 - 07:01:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 11 May 2007 - 07:31:48 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.