Reputation: 4052
I have code which sometimes I execute from within Rstudio, which has a nice plotter window. But the other times I execute it on a distant machine per command line.
Thus, I would like to know if there is some R environment variable that tells me if I am running code in an open terminal or via Rscript. If yes, I could decide to print the plots into a file or standard out.
Thanks for any hints!
Upvotes: 0
Views: 77