harrelfe/Hmisc

Problems with system command

nicholascarey opened this issue · 0 comments

I'm trying to use mdb.get to access an mdb file. I get the following error

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

I am on an M1 Mac on macOS Monterey. I have mdbtools installed. The problem seems to be the mdb-tables system command is not being recognised in the terminal. This also produces the same error:

system("mdb-tables --version")

However, if i take the command and paste it in the RStudio terminal (or macOS terminal) it runs fine:

XREDACTEDX % mdb-tables --version
mdbtools v1.0.0

Other system commands work fine, for example this:

> system("youtube-dl --version")
2020.12.09

I realise this is probably not a Hmisc error as such, but I'm hoping the solution is something simple and obvious.