R shiny app doesn't print to console

1,281 views
Skip to first unread message

Jose Magaña

unread,
Nov 3, 2014, 8:27:55 PM11/3/14
to shiny-...@googlegroups.com

I am implementing an R shiny application. I am using cat and print to write to the console and be able to see what is going on.

In the server.R I have some calls to cat before the shinyServer function and they work well. I have though other calls to cat inside shinyServer and their content is not printed although the code is executed, I see the output in the web UI, they are in a reactive block. The UI.R uses a submitButton in case this makes a difference.

As far as I have read, cat should send to console unless redirected, what I am not doing. I am also using cat with file="" and file=stdout() to try avoid any redirection.

If I run the app from a shortcut on the console that gets open the situation is the same. Any ideas on what can be happening?

I use R 3.1.1 and R studio 0.98 in Windows 7.

Joe Cheng

unread,
Nov 4, 2014, 1:35:50 AM11/4/14
to Jose Magaña, shiny-...@googlegroups.com

Yeah, stdout is redirected for renderPrint and I believe renderPlot.

Try cat(file=stderr(), ...) instead.

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/142870ad-519d-447c-a63e-2edcca14912d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jose Magaña

unread,
Nov 25, 2014, 3:48:20 PM11/25/14
to shiny-...@googlegroups.com, jose.a...@gmail.com
Thanks Joe.
That solved the issue.
Regards
Jose
Reply all
Reply to author
Forward
0 new messages