How do I run an R file in Terminal?
Answer
Answer
- To run a command you could also use Rscript -e “getwd()” in the terminal. …
- You can also use r -e “cat(getwd(),’n’)” if you have littler installed. …
- One should use R -r ‘options(warn=2); install…’ in order to halt the execution and get a non-zero error code in case the installation fails.