Google Groups

Re: debugTools.R for shiny, new improved


Roger Day Mar 29, 2015 7:50 AM
Posted in group: Shiny - Web Framework for R
When you call shinyServer,
be sure to add the session argument.

        shinyServer(function(input, output, session) {
instead of just 
        shinyServer(function(input, output) {


On Friday, January 2, 2015 at 5:46:28 PM UTC-5, Roger Day wrote:
This has been enormously helpful to me.  Handy utilities first:
assign("%&%",  function (a, b) paste(a, b, sep = "")
catn = function(...) cat(..., "\n")
wasClicked =  function(button) {
    if(exists("input"))  (!is.null(button) ) {    if(button > 0) {        
          return(TRUE)        }      }
    return(FALSE)
  }
#####

Save the attached file as debugTools.R. 
In server.R, 
source("debugTools.R", local=TRUE)
and using in ui.R via uiOutput("debugTools").
In ui.R, include in your list of UI interface objects
uiOutput("debugTools")

It's handy to keep the debugTools panel visible at the top,
while you scroll your window. 
Not as straightforward as it should be.  See my post
which solves the problem. (Works in FF, Safari, Chrome, not tested in IE.)