Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thanks for sharing! #2

Open
daauerbach opened this issue Dec 27, 2022 · 0 comments
Open

thanks for sharing! #2

daauerbach opened this issue Dec 27, 2022 · 0 comments

Comments

@daauerbach
Copy link

Thanks for posting up Access-from-R-Mac, I found it helpful to point towards something clunky but functional.

I didn't end up trying the full build from source route since the suggested formula on the mdbtools repo seemed to work ok (brew install mdbtools) to reach command line operations passed as system2 calls (what Hmisc is doing under the hood). I didn't get my standard odbc/DBI connections to work (despite some fiddling with the odbcinst.ini file), but even on a PC I've had pretty limited success passing SQL into Access via dbplyr/odbc translation. But this works to read a table into memory and/or assign and/or pipe to further manipulation.

f <- "path/to/file name that probably has spaces and who knows what else.mdb"
table <- "table_name"
system2(
  "mdb-export", 
  args = paste(stringr::str_replace_all(f, " ", "\\\\ "), "table"), 
  stdout = T) |> 
I() |> readr::read_csv()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant