Gui vs. command line - differentiating programmatically
On Mon, Apr 27, 2009 at 10:15 AM, Simon Urbanek
<simon.urbanek at r-project.org> wrote:
On Apr 27, 2009, at 10:28 , hadley wickham wrote:
Hi all, Is it possible to tell whether someone is using the R GUI or the command line programmatically?
Yes. If you're literally interested in the R.app GUI
Sys.getenv("R_GUI_APP_VERSION")
will be a real number (non-empty check should do).
Great - thanks. It's for a package where the user needs to be able to abort a long-running computation (an animation) and we're trying to give them correct cross-platform/gui instructions for doing so. Hadley