title: Object not found R Shiny
body: <p>I am trying to access the data frame created in one render function into another render function. </p>
  
  <p>There are two server outputs, lvi and Category, in lvi I have created Data1 data frame and Category I have created Data2 dataframe. I want to select Data2 where Data1 ID is matching. </p>
  
  <p>I am following the below steps to achieve my objective but I get error "Object Data1 not found". </p>
  
  <p>My UI is</p>
  
  <pre><code>ui &lt;- fluidPage(
    # App title ----
    titlePanel("Phase1"),
    fluidPage(
      column(4,
             # Input: Select a file ----
             fileInput("file1", "Import file1")
      ) 
    ),
    fluidPage(
      column(4,
             # Input: Select a file ----
             fileInput("file2", "Import File2")
      ) 
  
    ),
      # Main panel for displaying outputs ----
      mainPanel( 
        # Output: Data file ----
        dataTableOutput("lvi"),
        dataTableOutput("category")
      )
    )
  </code></pre>
  
  <p>My server code is</p>
  
  <pre><code>server &lt;- function(input, output) {
    output$lvi &lt;- renderDataTable({
      req(input$file1)
      Data1 &lt;- as.data.frame(read_excel(input$file1$datapath, sheet = "Sheet1"))    
    })
  
    output$category &lt;- renderDataTable({        
      req(input$file2)        
      Data2 &lt;- as.data.frame(read_excel(input$file2$datapath, sheet = "Sheet1"))
      Data2 &lt;- Data2[,c(2,8)]
      Data2 &lt;- Data2[Data1$ID == "ID001",]        
    })        
  }
  shinyApp(ui, server)
  </code></pre>