Run R script from command line
Asked 07 September, 2021
Viewed 2.7K times
  • 63
Votes

I have a file, called a.r, it has a chmod of 755,

sayHello <- function(){
   print('hello')
}

sayHello()

How can I run this via command-line?

7 Answer