[R] R Tcl/Tk [MacOSX] TkButton Problem

Duncan Murdoch murdoch.duncan at gmail.com
Sun Feb 27 14:54:04 CET 2011


On 11-02-27 7:31 AM, Stefan Richter wrote:
> Hi,
>
> I have a tktoplevel window and in it a tkbutton:
>
> AUS<- function()
> {
> 	foo(parameters);
> }
> AUSButton.but<- tkbutton(tt,text="OK",command=AUS)
>
> The function foo(...) does a time-consuming calculation, and during this calculation there is printed some progress information to the console.
>
> My problem: When I click the button "OK", the tktoplevel window and the R console don't react anymore, and there is nothing printed to the console until the calculation is finished (then all informations are printed out in one step).
> If I simply execute foo(...) in the console, the progress information is printed out step by step, as I want.
>
> Is there a possibility to change the call of foo(...) in this way that R and the window don't stop responding?

The flush.console() function will cause R to display pending text if 
you're running in the GUI.

Duncan Murdoch



More information about the R-help mailing list