title: Reactive not displaying appropriate graphs with working data filtering
body: <p>server code:</p>
  
  <pre><code>silver_state &lt;- fread("./Data/silver_state.csv")
  silver &lt;- silver_state %&gt;% arrange(total_drug_cost)
  
  state_cast &lt;- reactive({
   if(input$sort == "alphabetical"){
    silver &lt;- silver
  }
   else if(input$sort == "descending"){
    silver &lt;- silver_state %&gt;% arrange(desc(total_drug_cost))
    silver$nppes_provider_state &lt;- factor(silver$nppes_provider_state, 
    levels = silver$nppes_provider_state[order(silver$total_drug_cost)])
  }
   else{
    silver &lt;- silver_state %&gt;% arrange(total_drug_cost)
    silver$nppes_provider_state &lt;- factor(silver$nppes_provider_state, 
    levels = silver$nppes_provider_state[order(silver$total_drug_cost)])
  }
  
  })
  
  
  output$compare &lt;- renderPlot({
   ggplot(silver) + 
    geom_bar(aes(x = nppes_provider_state, y = total_drug_cost), position 
  = position_stack(reverse = TRUE), stat = "identity") +
    coord_flip() + 
    labs(title = "Total Cost of Drugs per State", y = "Total Drug Cost", 
  x = "State")
  })
  }
  
  shinyServer(my.server)
  </code></pre>
  
  <p>The data filtering runs fine on its own however, it is not passing through the inputs correctly? It has to be something surrounding how we are structuring the reactive function. Could it have anything to do with using multiple tabs? Thank you.</p>