Skip to content

Instantly share code, notes, and snippets.

@mplourde
Created September 24, 2014 13:55
Show Gist options
  • Save mplourde/99c02e58a5151647e092 to your computer and use it in GitHub Desktop.
Save mplourde/99c02e58a5151647e092 to your computer and use it in GitHub Desktop.
R debugging
options(shiny.reactlog=TRUE, warn=2, show.error.locations=TRUE, error=recover)
# interactive session
browser()
# print message
message('message')
# error handling
err.hanlder <- function(e) message(e)
warn.handler <- function(w) message(w)
tryCatch(expr, error=err.handler, warning=warn.handler
# shiny
runExample('01_hello')
# press Ctrl+F3 to review reactive dependency graph
# call showReactlog() after terminating server to view graph of previous session
runApp('path/to/myapp', display.mode='showcase') # for display mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment