Skip to content

Instantly share code, notes, and snippets.

@csgillespie
Created February 6, 2016 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csgillespie/dfed8e3a8796d603ae2d to your computer and use it in GitHub Desktop.
Save csgillespie/dfed8e3a8796d603ae2d to your computer and use it in GitHub Desktop.
## Save as Server.R
library("shiny")
#x = USArrests
#save(x, file="/tmp/tmp.RData")
server = function(input, output){
load("/tmp/tmp.RData")
output$table = output$table1 <- renderTable({x})
}
## Save as ui.R
library("shiny")
ui = fluidPage(
fluidRow(
column(3, tableOutput("table"))
)
)
## To run
shiny::runApp("/tmp/")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment