Message-ID: <9C3C2AE1-4DF5-44E3-822D-4C1ACEB6AB67@gmail.com>
Date: 2009-02-10T00:46:29Z
From: Fuchs Ira
Subject: pause in function execution
In-Reply-To: <C8BB13D0-79F1-4C71-AF37-59ECAF460E1A@auckland.ac.nz>
The binary in R.app starts the GUI. I suppose I would have to install
the command-line version separately.
On Feb 9, 2009, at 7:12 PM, Rolf Turner wrote:
>
> On 10/02/2009, at 12:55 PM, Duncan Murdoch wrote:
>
>> On 09/02/2009 6:27 PM, Fuchs Ira wrote:
>>> a=function() {
>>> print("start")
>>> print(Sys.time())
>>> Sys.sleep(5)
>>> print(Sys.time())
>>> print("end") }
>>>
>>> a()
>>>
>>> results in:
>>>
>>> [1] "start"
>>> [1] "2009-02-09 18:25:41 EST"
>>> [1] "2009-02-09 18:25:46 EST"
>>> [1] "end"
>>>
>>> all printed together after 5 seconds.
>>
>> The reason for this mysterious difference is presumably that you
>> are not
>> using the same front-end as Rolf, or maybe not the same version as
>> him,
>> or maybe you have the buffering set differently.
>>
>> sessionInfo() would remove some of the mystery, but I don't think it
>> says which Mac front end you're using. We should fix that. (It's not
>> just a Mac deficiency, Windows has the same omission.)
>
> Looking at the code of flush.console() (suggested by Remko Duursma)
> solved the mystery. It refers to the AQUA GUI. I don't use the
> GUI as a rule; I start R from the command line.
>
> When I started R from the GUI I got the same buffered phenomenon
> that afflicted Ira Fuchs. So one solution to his problem would
> presumably be to start R from the command line rather than by
> clicking on the GUI.
>
> There must be a way to switch off buffering when using the AQUA GUI
> though. Mustn't there?
>
> cheers,
>
> Rolf Turner
>
> ######################################################################
> Attention:This e-mail message is privileged and confidential. If you
> are not theintended recipient please delete the message and notify
> the sender.Any views or opinions presented are solely those of the
> author.
>
> This e-mail has been scanned and cleared by
> MailMarshalwww.marshalsoftware.com
> ######################################################################