[R] Read SAS data into R

kseefeld kseefeld at netzero.net
Fri May 11 17:27:46 CEST 2007


Kim’s EZ Recipe for….

SAS TO R, perfectly formatted table with no loss of data

•	In SAS: Export SAS DB as access db
•	In R go to directory where access db is stored
•	Use package RODBC

#R code
#Create connection object (Can set up DSN but I’m too lazy to)
c<-odbcConnectAccess("x.mdb")
#Create table object, store db in object
x<-sqlFetch(c, "test")
#Close connection object
odbcClose(c)


-- 
View this message in context: http://www.nabble.com/Read-SAS-data-into-R-tf3723790.html#a10434169
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list