Thursday, 16 August 2012

R with Database

Easy to do by installing RODBC.

After configuring ODBC driver, then from R console, enter

library(RODBC)
 myconn <-odbcConnect("Test", uid="root", pwd="root")
dt <- sqlQuery(myconn, "select * from test")
close(myconn) 


enjoy the output result dt from database!

No comments:

Post a Comment