Skip to content
Prev 10774 / 15075 Next

bypassing the R.app help browser?

On 13/08/2014 15:11, peter dalgaard wrote:
But Sys.sleep should not be blocking an event loop: from its help

      The intention is that this function suspends execution of R
      expressions but wakes the process up often enough to respond to
      GUI events, typically every 0.5 seconds.

The mechanisms to mesh event loops which are in place for Sys.sleep  are 
R_CheckUserInterrupt (which calls R_ProcessEvents) and R_runHandlers.

Note that the help for tkwait says (on my box)

        While  the  tkwait command is waiting it processes events in the 
normal
        fashion, so the application will continue to respond to  user 
interac-
        tions.   If  an  event handler invokes tkwait again, the nested 
call to
        tkwait must complete before the outer call can complete.

but as this is X11 Tk, it means X11/Unix events.  You can demonstrate 
that, as e.g the http server still works (use help.start() first).