Is there a way to capture console output to Shiny UI synchronously?
I searched some solutions like this one. It works nicely with standard errors, but not standard out like information by print
or cat
.
Is there a way I can catch them all?
e.g a function:
foo <- function() {
cat("one\n")
Sys.sleep(3)
print(1)
cat("two\n")
}
if I use verbatimTextOutput
, I can only see the results after everything is done. The standard error solution above is not working for this case.
Thanks