Skip to content

Instantly share code, notes, and snippets.

@jcheng5
Forked from jeffreyhorner/server.R
Created December 14, 2012 21:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jcheng5/4288960 to your computer and use it in GitHub Desktop.
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())
})
})
shinyUI(bootstrapPage(
sliderInput('n', 'N', 1, 10, 1)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment