I typically use print when I'm building shinyapps as a way to check to make sure what I think should happen is actually what is happening. However, I've run into a problem where print is no longer printing to the R console when I have an app running. Here's a simple example of what I've tried:
ui <- fluidPage(
sliderInput("slider", "Slider Range",
min = 0, max = 5000, value = c(11))
)
server <- function(input, output){
print("Non-Reactive")
new <- reactive({
print("Reactive")
print(input$slider)
})
}
shinyApp(ui, server)
Within the R console, I get: [1] "Non-Reactive" and that is it. No [1] "Reactive" or [1] 11 for my slider.
I know it used to work before, but I'm not sure what changed. If there's another easier way to check/debug code for shinyapps aside from print I'd love to know my other options too.
Note: My shinyapp package is version 0.13.0. My RStudio version is 0.99.491. R is currently 3.2.2.
print(input$slider)on any other type of shiny function (likerenderPrint) it would have done it? Maybe I've somehow avoided usingprint()when verifying things before. - puginablanket