title: In R Shiny How to Separate Slider Input Values and Filter with them
body: <p>In R's <code>shiny</code> package you can have a slider widget using <code>sliderInput</code> that has an upper and lower bound. </p>
  
  <p>I would like to be able to separate the upper and lower bound values and filter a column of data with them, before passing that data to <code>UI.R</code>.</p>
  
  <p>For example:</p>
  
  <p><strong>Server.R</strong></p>
  
  <pre><code>library(shiny)
  data &lt;- read.csv('some_data_to_filter.csv')
  
  # Define server logic for slider examples
  shinyServer(function(input, output) {
  
    # Reactive expression to compose a data frame containing all of
    # the values
    sliderValues &lt;- reactive({
  
      # Compose data frame
      data.frame(
        Name = c("Range"),
        Value = as.character(c(paste(input$range, collapse=' '),)), 
        stringsAsFactors=FALSE)
    }) 
  
    # Show the values using an HTML table
    output$values &lt;- renderTable({
      sliderValues()
    })
  })
  </code></pre>
  
  <p><strong>UI.R</strong></p>
  
  <pre><code>library(shiny)    
  # Define UI for slider demo application
  shinyUI(fluidPage(
  
    #  Application title
    titlePanel("Sliders"),
  
    sidebarLayout(
      sidebarPanel(      
    # Specification of range within an interval
        sliderInput("range", "Range:",
                    min = 1, max = 1000, value = c(200,500))
  ),
  
      # A table summarizing the values entered
      mainPanel(
        tableOutput("values")
      )
    )
  ))
  </code></pre>
  
  <p>In the example above I read in the data and I have a slider, but there's no filtering of the data like I'd like there to be.</p>
  
  <p>This was my best attempt to split and filter, but it throws an error:</p>
  
  <pre><code>myrange &lt;- reactive({ data.frame(strsplit(Value = input$slider))})
  data &lt;- data[data$colname &lt;= as.numeric(myrange[2]),]
  data &lt;- data[data$colname &gt;= as.numeric(myrange[2]),]
  </code></pre>