In a Shiny app, is there a way to capture the insight::format_alert text? #657
-
I have a large Shiny app and am adding some credible interval output via ci(). In some situations the script will use insight::format_alert() to send a message to the console, for example:
What I would like to do is capture any alert text and add it to the output in the Shiny app. As it is, it goes to the console, but the user might not see that and might not understand why there are no CIs. I tried to use tryCatch() but it isn't working since I don't think the message counts as a warning or error, though maybe I am off-base about that. Is this possible? Thank you very much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
These are "messages" in R's exception lingo. Here is some code that you could use to capture messages, errors, and warnings https://www.r-bloggers.com/2020/10/capture-message-warnings-and-errors-from-a-r-function/ |
Beta Was this translation helpful? Give feedback.
These are "messages" in R's exception lingo. Here is some code that you could use to capture messages, errors, and warnings
https://www.r-bloggers.com/2020/10/capture-message-warnings-and-errors-from-a-r-function/