title: ggplot2 doesn't know how to deal with data of class reactive
body: <p>It seems that reactive encapsulated variables, so the variable inside tweets can not be accessed... so how to fix it ? or do not use reactive ?</p>
  
  <p>the csv file <a href="https://drive.google.com/open?id=0B5vskinwpq83VkJRRm5XcDRSSEE" rel="nofollow noreferrer">tweets_davin</a> and just use both for 2 upload</p>
  
  <p>ui.r</p>
  
  <pre><code>library(shiny)
  shinyUI(fluidPage(
  
    titlePanel("Text Mining"),
    br(),br(),
  
    sidebarLayout(
      sidebarPanel(
        h2("Davin", align = "center", style = "color:blue"),
        fileInput('file1', 'Choose CSV File', accept=c('.csv')),
        fileInput('file2', 'Choose CSV File', accept=c('.csv')),
        tags$hr()
      ),
  
      mainPanel(
        plotOutput("ditribusi")
  
      ))))
  </code></pre>
  
  <p>server.r</p>
  
  <pre><code>library(shiny)
  
  shinyServer(function(input, output) {
  
    library(lubridate)
    library(ggplot2)
    library(dplyr)
    library(readr)
  
    tweets_1 &lt;- reactive({
      req(input$file1)
      read.csv(input$file1$datapath)
    })
  
    tweets_2 &lt;- reactive({
      req(input$file2)
      read.csv(input$file1$datapath)
    })  
  
      tweets &lt;- reactive (
      as(bind_rows(tweets_1 %&gt;% 
                            mutate(person = "satu"),
                          tweets_2 %&gt;% 
                            mutate(person = "dua")) %&gt;% 
      mutate(timestamp = ymd_hms(timestamp))))
  
  
      output$ditribusi &lt;- renderPlot(
        ggplot(tweets, aes(x = timestamp, fill = person)) +
          geom_histogram(alpha = 0.5, position = "identity", bins = 20)
    )
  
  
  })
  </code></pre>
  
  <p>error in RStudio</p>
  
  <p>Warning: Error in : ggplot2 doesn't know how to deal with data of class reactive</p>
  
  <p>Stack trace (innermost first):</p>
  
  <pre><code>105: fortify.default
  104: fortify
  103: structure
  102: ggplot.data.frame
  101: ggplot.default
  100: ggplot
   99: renderPlot
   89: &lt;reactive:plotObj&gt;
   78: plotObj
   77: origRenderFunc
   76: output$ditribusi
    1: runApp
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/XzOGE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XzOGE.png" alt="enter image description here"></a></p>