How do I run an R code in Linux?

How do I run an R code in Linux?
Answer
Running R in batch mode on Linux
  1. use Rscript. First things first: the best program to run R scripts in batch mode is Rscript , which comes with R. …
  2. run Rscript with a shebang. …
  3. use optparse to read command line arguments. …
  4. use cat() to write output.
 

Tìm kiếm

Back
Top