title: Shiny sliderInput showing duplicate values
body: <p>I have an issue with <code>sliderInput</code>. In my app, when a user loads data (<code>actionBTTN</code>) the years of my <code>sliderInput</code> get updated (with <code>updateSliderInput</code>) according to that data. But I have noticed that for data containing few years (4-5) the <code>sliderInput</code> would show repeated years. I also noticed, that it seems to only happens when my screen size is bigger.</p>
  <p>Here is how it looks with a small sized window:
  <a href="https://i.stack.imgur.com/MNBiE.png" rel="nofollow noreferrer">no duplicated year values, how I would like it to be in the app</a>
  And here is how it looks with a larger window:
  <a href="https://i.stack.imgur.com/pkG5Y.png" rel="nofollow noreferrer">duplicated year values</a></p>
  <p>Here is an example of my app:</p>
  <pre><code>
  library(shiny)
  library(shinyWidgets)
  
  ui &lt;- fluidPage(
    sidebarLayout(
      sidebarPanel(
        # initial input with no years selected, it will update once data is loaded
        sliderInput(
          inputId = &quot;years&quot;, 
          label = &quot;Choose a time range:&quot;, 
          min = 0, max = 1, 
          value = c(0,1), 
          #dragRange = TRUE, 
          step = 1, 
          sep = ''
        ),
        actionBttn(
          inputId = &quot;load_data&quot;,
          label = &quot;Get data!&quot;,
          color = &quot;primary&quot;,
          style = &quot;fill&quot;, 
          icon = icon(&quot;arrow-alt-circle-down&quot;),
          size = &quot;xs&quot;,
          block = TRUE
        )
      ),
      mainPanel()
    )
  )
  
  server = function(input, output, session) {
    observeEvent(input$load_data, {
      mydata &lt;- data.frame(numbers = c(1:5), year = c(2010:2014))
      
      minim = min(mydata$year)
      maxim = max(mydata$year)
      
      updateSliderInput(session, inputId = &quot;years&quot;,
                        min = minim, max = maxim, 
                        value = c(minim, maxim),
                        # calculate step dynamically (@Isa's idea)
                        step = seq(minim, maxim, length.out = length(mydata$year))[2] - seq(minim, maxim, length.out = length(mydata$year))[1])
    })
  }
  
  shinyApp(ui, server)
  </code></pre>
  <p>I have already tried changing the <code>step</code> and <code>sep</code> arguments, also seting <code>mydata$year</code> as integer. Has anybody encountered the same issue?
  All help is welcome.</p>
  <p>Thanks :)</p>