Skip to content

Instantly share code, notes, and snippets.

@kevinushey
Created September 4, 2014 23:53
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 kevinushey/04a045e71124b30c1aac to your computer and use it in GitHub Desktop.
Save kevinushey/04a045e71124b30c1aac to your computer and use it in GitHub Desktop.
Input slider has some bugs when used through uiOutput
library(shiny)
## Example
# shinyServer(function(input, output) {
# output$value <- renderPrint({ input$sliderId })
# })
## uiOutput
shinyServer(function(input, output) {
output$slider <- renderUI({
sliderInput("sliderId", label = h3("Slider Range"), min = 0, max = 100,
value = c(25, 75))
})
output$value <- renderPrint({ input$sliderId })
})
library(shiny)
## Example
# shinyUI(fluidPage(
# sliderInput("sliderId", label = h3("Slider Range"), min = 0, max = 100,
# value = c(25, 75)),
# fluidRow(column(3, verbatimTextOutput("value")))
# ))
## uiOutput
shinyUI(fluidPage(
uiOutput("slider"),
fluidRow(column(3, verbatimTextOutput("value")))
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment