Running Rscript on Mac OS X

I have a BATCH script file on a Windows computer that consists of the following line:

c:\R\bin\Rscript.exe "c:\Users\user\Documents\Shares.R" 

I want to do the same, but using Mac OS X at the moment I am using Automator => Run Shell script and the following line:

open "/usr/bin/Rscript" "/Users/usr/Documents/Shares.R"

It opens R, finds the file and displays the R code. I want the R code contained in the script to run (like on Windows).

Any ideas?

Anthony.

+3
source share
1 answer

It'll be enough:

/usr/bin/Rscript "/Users/usr/Documents/Shares.R"
+8
source

Source: https://habr.com/ru/post/1761395/


All Articles