title: usemethod error in filter when filtering a dataset within shiny server
body: <p>I was trying to code a shiny application that loads a Rdata based on the input of the users, filters it, and graphs the result. All Rdata files are located in a folder and follow the same name format. Here is the example of my code for the server.</p>
  <pre><code>server &lt;- function(input, output) {
    data &lt;- reactive({load(paste0(&quot;themewise_final_datasets/final_&quot;, input$Theme, &quot;_theme.RData&quot;))})
    data_filtered &lt;- reactive({data() %&gt;%
        filter(str_detect(locations, input$location))})
  
    output$average_tone_graph &lt;- renderPlot({
      data_filtered() %&gt;%
  # below there were irrelevant code graphs.
  </code></pre>
  <p>The problem with this code is that even though the server loads the rdata, it doesn't filter it. I get the error UseMethod: no applicable method for 'filter' applied to an object of class &quot;character&quot;. I couldn't fix it. I thought it might be because the columns are factors and tried to fix that, but that is not the problem.</p>