0

Is it possible to print values from the console into a text box or label while running a Shiny application.

My shiny application creates a call to Big Query and while BQ is running the query R Studio console prints the running time like so.. (image below)

enter image description here

I want to print this timer in the ui.R while the query is still running so the user knows they have to wait for the query to finish.

Can this be done?

  • You can print console messages in Shiny apps. See: https://stackoverflow.com/questions/30474538/possible-to-show-console-messages-written-with-message-in-a-shiny-ui – GyD Sep 20 '17 at 09:56

1 Answers1

0

capture.output can be used to capture such process console outputs and can be assigned to valueBox or label!

https://stat.ethz.ch/R-manual/R-devel/library/utils/html/capture.output.html

> warnings()
Warning message:
package ‘itunesr’ was built under R version 3.4.1
> test <- capture.output(warnings())
> test
[1] "Warning message:"                                  "package ‘itunesr’ was built under R version 3.4.1"
> 
amrrs
  • 6,215
  • 2
  • 18
  • 27