, R ( Linux), , , , R sh.
: Mac-Os ( Mojave)
R-: 3.6
1: R Mac, Brew.
$ brew install r (- R -)
2: sh. (StartR.sh)
$ touch startR.sh
3: startR.sh
$ vim startR.sh
( )
#!/bin/sh
Rscript sample.r
echo " r sample run"
exit
(--- R sample.R -)
sayHello & lt; - function() {
( "")
}
()

( , , )
: , sample.R , startR.sh
4: .sh
$ chmod 750 startR.sh
5: .sh
$ sh startR.sh
, .
During startup - Warning messages: 1: LC_COLLATE installation failed using "C" 2: LC_TIME installation failed using "C" 3: LC_MESSAGES installation failed using "C" 4: LC_MONETARY installation failed using "C" "
1 " hello "r startup pattern

source
share