Description Usage Arguments Details References Examples
Put it inside the shiny::observe
in case of reactive values are run.
Timestamp displaying date and time is prepended to log messages.
Other than debugging purposes, it can also be used as a logger when
re-directed to a file. However, the performance is not tested.
1 | shinyprintf(x, text = NULL, con = "stdout")
|
x |
variable (static or reactive). See Details. |
text |
character. (optional) description added to the variable name.
if empty, the default value is |
con |
character. Pipe connection. The options are |
Recommended to add the following snippet as shinyprinf:
observe(mmy::shinyprintf(${1:var}, text = NULL))
.
See Shiny's Reactivity to understand what a "reactive variable" is.
https://shiny.rstudio.com/articles/debugging.html
1 2 3 4 5 6 7 | ## Not run:
x <- 1L
shinyprintf(x, "test")
## Persistent logging to a file:
shinyprintf("test", con = file.path(getwd(), "file.log"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.