简体   繁体   中英

Mac R work with mdbtools works with macport install not home-brew install

I am using R to access a .mdb file.

library("Hmisc")

mdb.get("NCSS_Lab_Data_Mart_09142018.mdb", tables=TRUE)

Before to use this r code, I need to install home-brew for m1 Mac. Then I installed the mdbtools with: brew install mdbtools. however, my r doesn't work. with error that :

ERROR: sh: mdb-tables: command not found
Fehler in system(paste("mdb-tables -1", file), intern = TRUE) : 

But I can run mdb-ver in my terminal, which means my mdbtools is successfully installed.

Then I use macport to install the mdbtools. Now everything works fine. the R code works very well.

I am just curious what makes this happen. I want to know Why? thanks for helping me guys!

Maybe this is a comment, but do not have reputation to do so.

I had a similar problem and did a workaround with using R from the terminal where it ran ok.

So, from RStudio, returns the same error, but when I do it from the terminal (inside R prompt), works fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM