Skip to content

Instantly share code, notes, and snippets.

@jeffreyhorner
Created December 14, 2012 21:48
Show Gist options
  • Save jeffreyhorner/4288939 to your computer and use it in GitHub Desktop.
Save jeffreyhorner/4288939 to your computer and use it in GitHub Desktop.
Reactivity #3
library(shiny)
shinyServer(function(input, output) {
re <- reactive(function(){
cat("re called\n",file=stderr())
input$n
})
output$ntext <- reactiveText(function() {
cat("output$ntext called\n",file=stderr())
paste(input$n," * 2 =",input$n + re())
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment