title: shiny sliderInput range minimum and maximum values
body: <p>I need to adjust a histogram output in shiny with a range values:</p>
  
  <p>(where m is an arbitrary matrix)</p>
  
  <pre><code>#ui.R
  sliderInput(inputId="adjust", label="Choose adjacency threshold", value=c(0.001, 0.9), min=0.0001, max=1),
  plotOutput("hist")
  
  #server.R
  df&lt;-reactive({
  idx = m &gt; min(input$adjust) &amp; m &lt; max(input$adjust)
      data.frame(
        id = row(m)[idx],
        value = m[idx])
  })
  output$hist&lt;-renderPlot({hist(df()$values)})
  </code></pre>
  
  <p>However this doesn't seem to affect the histogram- it re-renders when I toggle the slider but its the same each time.... it takes a very long time and it just seems to take all of the values in into account?</p>
  
  <p>Does anyone know how to make this work?</p>
  
  <p>when I try to print the slider's min/max value- nothing comes to the page:</p>
  
  <pre><code>#ui.R
  verbatimTextOutput("x")
  #server
  output$x&lt;-renderPrint({min(input$adjust)})
  </code></pre>
  
  <p>Hence I might be approaching this the completely wrong way... does anyone know how to do this?</p>
  
  <p>FULL EXAMPLE</p>
  
  <pre><code>library(shiny)
  runApp(list(ui = fluidPage(sliderInput(inputId="adjust", label="Choose adjacency threshold", value=c(0.001, 0.9), min=0.0001, max=1),
  plotOutput("hist")
  server=function(input, output){
     adjacentmat&lt;-reactive({adjacency(dat)})
     data&lt;-reactive({
      adj_mat&lt;-adjacentmat()
      adj_mat[adj_mat &lt; input$adjust] &lt;- 0
      m&lt;-adj_mat
      idx = m &gt; min(input$adjust) &amp; m &lt; max(input$adjust)
      data.frame(
        source = row(m)[idx],
        target = col(m)[idx],
        corr = m[idx])
    })
    output$hist&lt;-renderPlot({hist(data()$corr)})
  }
  )
  </code></pre>
  
  <p>generate the dat variable with the following code:</p>
  
  <pre><code>library('dplyr')
  set.seed(1)
  
  # generate a couple clusters
  nodes_per_cluster &lt;- 30
  n &lt;- 10
  
  nvals &lt;- nodes_per_cluster * n
  
  # cluster 1 (increasing) 
  cluster1 &lt;- matrix(rep((1:n)/4, nodes_per_cluster) + 
                     rnorm(nvals, sd=1),
                     nrow=nodes_per_cluster, byrow=TRUE)
  
  # cluster 2 (decreasing)
  cluster2 &lt;- matrix(rep((n:1)/4, nodes_per_cluster) + 
                     rnorm(nvals, sd=1),
                     nrow=nodes_per_cluster, byrow=TRUE)
  
  # noise cluster
  noise &lt;- matrix(sample(1:2, nvals, replace=TRUE) +
                  rnorm(nvals, sd=1.5),
                  nrow=nodes_per_cluster, byrow=TRUE)
  
  dat &lt;- rbind(cluster1, cluster2, noise)
  colnames(dat) &lt;- paste0('n', 1:n)
  rownames(dat) &lt;- c(paste0('cluster1_', 1:nodes_per_cluster), 
                     paste0('cluster2_', 1:nodes_per_cluster),
                     paste0('noise_',    1:nodes_per_cluster))
  </code></pre>