Replies: 2 comments
-
|
Run a script in the command line by entering:
For more information: https://cran.r-project.org/doc/manuals/R-intro.html#Invoking-R-from-the-command-line Then construct a batch command using vi editor and chmod 777 (linux, unix, MacOS). |
Beta Was this translation helpful? Give feedback.
-
|
Another way to set up a batch file is with functions within R. This may be preferable if you need to pass command options to your script on each iteration. Set up your script as a function: I like to save every function in its own R script called command_name.R. Then, call your function in another R script: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The question was posed, how to run a script such that it can be run as a batch command.
Beta Was this translation helpful? Give feedback.
All reactions