[R] SAS Data

Shubha Vishwanath Karanth shubhak at ambaresearch.com
Mon Oct 13 15:12:58 CEST 2008


library(foreign)
Rdata=read.ssd("Z:/MyFolder","data1",sascmd = "C:/Program Files/SAS/SAS 9.1/sas.exe")

Rdata
    Y D1 D2 D3
1 100  1  0  0
2 101  1  0  0
3 105  1  0  0
4 200  0  1  0
5 201  0  1  0
6 205  0  1  0
7 300  0  0  1
8 301  0  0  1
9 305  0  0  1

where 'data1' is the SAS datafile to be read, ' Z:\\MyFolder' is the physical path where 'data1.sas7bdat' is situated and 'sascmd' refers to the path where SAS is installed in your system. Please confirm that your SAS is installed in the same path. Also note that you have to install the 'foreign' package to do this.

BR, Shubha
Shubha Karanth | Amba Research
Ph +91 80 3980 8031 | Mob +91 94 4886 4510 
Bangalore * Colombo * London * New York * San José * Singapore * www.ambaresearch.com

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Stefo Ratino
Sent: Monday, October 13, 2008 5:20 PM
To: r-help at r-project.org
Subject: [R] SAS Data

Hello everybody,

I would like to read a SAS Data data1.sas7bdat in R! Is this possible?

Thank you a lot in advance ;),
Stefo

______________________________________________
R-help at r-project.org 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.
This e-mail may contain confidential and/or privileged i...{{dropped:10}}



More information about the R-help mailing list