title: how to show contents of uploaded csv in shiny
body: <p>My <code>ui.R</code></p>
  
  <pre><code>library(shiny)
  library(stats)
  library(caret)
  
  shinyUI(fluidPage(
     titlePanel("Predicting Resources for Vessel"),
     title = "Resource Prediction",
  
     sidebarLayout(
      sidebarPanel(
          fileInput("file1", "Choose a Import BAPLE(.CSV) file to upload:",
                    accept = c("text/csv", "text/comma-separated-values, text/plain", ".csv")),
  
          fileInput("file2", "Choose a Export BAPLE(.csv) file to upload:",
                    accept = c("text/csv", "text/comma-separated-values, text/plain", ".csv")),
  
          fileInput("file3", "Choose a Import/Export containers yard location(.CSV) file to upload:",
                    accept = c("text/csv", "text/comma-separated-values, text/plain", ".csv")),
  
          tags$hr(),
          h4("Manual Input:"),
          numericInput("Restow_40","Total Restows for 40ft Container:", 0, min = 0, max = 999999, step = 1),
          textInput("Berth","Vessel Berth Location (CB3/CB4)"),
          actionButton("submit", "Submit")
  
          ),
      mainPanel(
          tabsetPanel(
            tabPanel("Raw Data", dataTableOutput("data")),
            tabPanel("Output", verbatimTextOutput("pred_output"))
  
          )
    )
      )
  ))
  </code></pre>
  
  <p>This is my <code>server.r</code> file</p>
  
  <pre><code>library(shiny)
  library(stats)
  #library(caret)
  library(mlr)
  library(data.table)
  
  shinyServer(function(input, output) {
  
   ######################### Reading the required files ###################################
  
    import_baple &lt;- reactive({
      inFile &lt;- input$file1
      if (is.null(inFile)) return(NULL)
      read.csv(inFile$datapath)
  })
  
    export_baple &lt;- reactive({
      inFile &lt;- input$file2
      if (is.null(inFile)) return(NULL)
      read.csv(inFile$datapath)
    })
  
    import_export_yard &lt;- reactive({
      inFile &lt;- input$file3
      if (is.null(inFile)) return(NULL)
      read.csv(inFile$datapath)
    })
  
    output$data &lt;- renderDataTable({
      import_baple()
    })
  
    output$data &lt;- renderDataTable({
      export_baple()
    })
  
    output$data &lt;- renderDataTable({
      import_export_yard()
    })
  })
  </code></pre>
  
  <p>I want all the three files when uploaded to be displayed in <code>Raw Data</code> tab. When I upload first two files no content is displayed in the <code>Raw Tab</code>, but when I upload the third file content is displayed in the tab. I am not getting where I am doing it wrong. </p>