How to call a program within a bash chunk in R markdown file?

973 Views Asked by At

In the block below, TSF_process is available from any directory (is in the PATH env). However, when I run this chunk:

{bash process, echo=TRUE}
TSF_process ./raw_data/settings.set 1

I get the error msg:

/tmp/RtmpK4MjsR/chunk-code1c4af3bc4f8b8.: line 2: TSF_process: command not found

However, if I copy the TSF_process file into my working directory and do this chunk:

{bash process, echo=TRUE}
./TSF_process ./raw_data/settings.set 1

...everything works ok.

Is there any way to avoid the step of copying the binary file into my working directory?

0

There are 0 best solutions below