flush_console: An emulation of flush.console() in evaluate()

View source: R/watcher.R View source: R/watcher.R

flush_consoleR Documentation

An emulation of flush.console() in evaluate()


When evaluate() is evaluating code, the text output is diverted into an internal connection, and there is no way to flush that connection. This function provides a way to "flush" the connection so that any text output can be immediately written out, and more importantly, the text handler (specified in the output_handler argument of evaluate()) will be called, which makes it possible for users to know it when the code produces text output using the handler.




This function is supposed to be called inside evaluate() (e.g. either a direct evaluate() call or in knitr code chunks).

evaluate documentation built on May 31, 2023, 6:23 p.m.