[R-SIG-Mac] Gui vs. command line - differentiating programmatically
hadley wickham
h.wickham at gmail.com
Mon Apr 27 18:34:40 CEST 2009
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
--
http://had.co.nz/
More information about the R-SIG-Mac
mailing list