Hi Erin,

do you see the difference between sliderTextInput and selectInput? I would like to have the selectInput behaviour (list element name in display, but result as value of list element) in sliderTextInput as well.

Best Sigbert

---

library("shiny")
library("shinyWidgets")

ui <- fluidPage(
  br(),
  sliderTextInput(
    inputId = "mySliderText",
    label = "My House",
    choices = list("choice 1" = 1,"choice 2" =2,
                   "choice 3" = 3)
  ),
  selectInput(inputId="slope", label="selectInput",
               choices=list("Choice 1" = "A","Choice 2" = "B",
                            "Choice 3" = "C")),
  verbatimTextOutput(outputId = "result")
)


server <- function(input, output, session) {

  output$result <- renderPrint({
    str(input$mySliderText)
    str(input$slope)
  })
}

shinyApp(ui = ui, server = server)


--
https://hu.berlin/sk
https://hu.berlin/mmstat3

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to