Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 202012

Avoid sliderInput rounding

$
0
0

I'm having trouble with sliderInput rounding my starting value parameter when the min/max range is large. How can I prevent sliderInput from rounding my starting value parameter in cases like the example below?

library(shiny)

ui <- fluidPage(
    sliderInput(
      inputId = "test",
      label = "A Nice Label",
      min = 2.52,
      max = 45734.68,
      value = 30982.63, # auto rounded to nearest integer in application, which I do not want it to do.
      round = FALSE # tried this argument, no dice.
    ),
    verbatimTextOutput(
      "value"
    )
  )

## SERVER PROCESSING DEFINITION
# this section defines how data is processed in response to manipulations in the ui
server <- function(input, output, session) {

  output$value <- renderText({
    input$test
  }) 

}

shinyApp(ui, server)

Viewing all articles
Browse latest Browse all 202012

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>