Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Access

MS/Access databases, on MSWindows, can be directly accessed through ODBC with an odbcConnectAccess. A database can be querired for a list of all tables available, using sqlTables, and imported with sqlFetch or sqlQuery. We can then directly save the table as an R object fo simpler loading into R at a later time:

> library(RODBC)
> channel <- odbcConnectAccess("h:/sample.mdb")
> sqlTables(channel)$TABLE_NAME
> clients <- sqlFetch(channel, "Clients")
> odbcClose(channel)
> save(clients, file="clients.RData")



Copyright © 2004-2006 Graham.Williams@togaware.com
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.