How do I read an accdb file into R using the package RODBC on Linux?

83 Views Asked by At

I'm trying to read an accdb file into R, using the package RODBC, but I'm getting an error message and would appreciate some help! I'm runnning Linux and not sure if that is making life more difficult than it would be on windows?

The database is detections.accdb, in the data subdirectory of my working directory. I tried

library("RODBC")

con <- odbcConnect("data/detections.accdb")

but got the error

Warning messages: 1: In RODBC::odbcDriverConnect("DSN=data/detections.accdb") : [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data source name not found, and no default driver specified 2: In RODBC::odbcDriverConnect("DSN=data/detections.accdb") : ODBC connection failed

FWIW these are the R and Ubuntu versions I'm using:

sessionInfo()

R version 4.3.1 (2023-06-16) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.6 LTS

Over here (How to read data from Microsoft Access .accdb database files into R?) I see comments that suggest it is impossible to do what I'm trying to do in Linux? Is that still true in 2023?

0

There are 0 best solutions below