Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Live Sliders Example server.R
- # The server side of the Slider application is very
- # straightforward: it creates a data frame containing all
- # of the input values and then renders it as an HTML table:
- library(shiny)
- # Define server logic for slider examples
- shinyServer(function(input, output) {
- # Reactive expression to compose a data frame containing all of the values
- sliderValues <- reactive({
- # Compose data frame
- data.frame(
- Name = c("Integer",
- "Decimal",
- "Range",
- "Custom Format",
- "Animation"),
- Value = as.character(c(input$integer,
- input$decimal,
- paste(input$range, collapse=' '),
- input$format,
- input$animation)),
- stringsAsFactors=FALSE)
- })
- # Show the values using an HTML table
- output$values <- renderTable({
- sliderValues()
- })
- })
Add Comment
Please, Sign In to add comment