How do I test if R is running as Rscript? How do I test if R is running as Rscript? hadoop hadoop

How do I test if R is running as Rscript?


You could use interactive to test if R is running in interactive mode. interactive will return FALSE under Rscript and TRUE under (most?) GUIs.