Syncing window plot update events during long-running evaluation
I have two source packages, one normal and another a Tcl/Tk UI
for controlling the former. However, as all UI arguments are
passed to a single (potentially VERY long-running) function in
the normal package, all output shows up after the completion of
that function. I have a sort-of workaround for updating progress
on UI during this, but one issue remains consistent. Early in
the process, the normal package displays a graph so the user can
determine whether it is worthwhile to continue. Problem is that
the plot window shows up onscreen (empty) but never fills until
the everything is done, defeating its purpose; I need a means of
flushing pending R graphic events.
While trying to figure out how to fix this, I have noticed that
executing the browser() method allows the plot window to fill prior
to completion of the rest of the routine. Is there some means of
triggering a pause in R execution that can be immediately resumed?
Assuming browser() as a candidate, I would like to invoke it, then
immediately continue (without user interaction being required to
I had hoped to use 'browser(expr=FALSE)' but that doesn't seem
to help. Any ideas appreciated.