Skip to content

Gui vs. command line - differentiating programmatically

3 messages · Hadley Wickham, Simon Urbanek

#
On Apr 27, 2009, at 10:28 , hadley wickham wrote:

            
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).
If you want to know whether you're running in some GUI with Aqua  
support (the R GUI is one of them, but it could be others, too), you  
can use
.Platform$GUI=="AQUA"
This may, however, change in the future as we generalize AQUA-specific  
features into core R.

Cheers,
Simon
#
On Mon, Apr 27, 2009 at 10:15 AM, Simon Urbanek
<simon.urbanek at r-project.org> wrote:
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