Created
September 24, 2014 13:55
-
-
Save mplourde/99c02e58a5151647e092 to your computer and use it in GitHub Desktop.
R debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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