Guest User

Untitled

a guest
Nov 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. # Live Sliders Example server.R
  2. # The server side of the Slider application is very
  3. # straightforward: it creates a data frame containing all
  4. # of the input values and then renders it as an HTML table:
  5.  
  6. library(shiny)
  7.  
  8. # Define server logic for slider examples
  9. shinyServer(function(input, output) {
  10.  
  11. # Reactive expression to compose a data frame containing all of the values
  12. sliderValues <- reactive({
  13.  
  14. # Compose data frame
  15. data.frame(
  16. Name = c("Integer",
  17. "Decimal",
  18. "Range",
  19. "Custom Format",
  20. "Animation"),
  21. Value = as.character(c(input$integer,
  22. input$decimal,
  23. paste(input$range, collapse=' '),
  24. input$format,
  25. input$animation)),
  26. stringsAsFactors=FALSE)
  27. })
  28.  
  29. # Show the values using an HTML table
  30. output$values <- renderTable({
  31. sliderValues()
  32. })
  33. })
Add Comment
Please, Sign In to add comment