[R] Importing Access 2007 data with ROBC
David Scott
d.scott at auckland.ac.nz
Wed Mar 10 04:14:40 CET 2010
Ryan Utz wrote:
> Hi all,
>
> I'm trying to import Microsoft Access data into R. It looks like I'm
> supposed to use the ROBC package, and this works fine with old Access
> files (those with an .mdb extension).
>
> However, lovely Microsoft must constantly update their software. Modern
> Access files have an .ACCDB extension. I cannot seem to coerce R to import
> data from such a file. Any advice?
>
> I've been using this code:
>
> testdb <- file.path("c:/Salmon_data.mdb")
> channel <- odbcConnectAccess(testdb)
> Data <- sqlFetch(channel,"Table1")
>
> When I replace it with an Access 2007 file:
>
> testdb <- file.path("c:/Salmon_data.accdb")
> channel <- odbcConnectAccess(testdb)
> Data <- sqlFetch(channel,"Table1")
>
Try
odbcConnectAccess2007
instead.
David Scott
--
_________________________________________________________________
David Scott Department of Statistics
The University of Auckland, PB 92019
Auckland 1142, NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email: d.scott at auckland.ac.nz, Fax: +64 9 373 7018
Director of Consulting, Department of Statistics
More information about the R-help
mailing list