Example for MS SQL access using R script and RODBC

library(RODBC)
channel<-odbcConnect("mike_db", uid="mike")
sqlTables(channel)
a<-sqlFetch(channel,"AnE")
b<-sqlFetch(channel,"vwAnE")
b<-sqlQuery(channel, paste("select * from vwAnE order by loc, month_val"))
xyplot(N~month_val|LOC,b, type="l")

Leave a Reply