title: How I add extra table under the third mainpanel to shiny app
body: <p>I have put together a shiny app. Now, I need to add another panel to that but by simply adding extra mainplanel to the code, my other two panels being deactivated</p>
  
  <p>This is my app</p>
  
  <pre><code>navbarPageWithText &lt;- function(..., text) {
  
    navbar &lt;- navbarPage(...)
  
    textEl &lt;- tags$p(class = "navbar-text", text)
  
    navbar[[3]][[1]]$children[[1]] &lt;- htmltools::tagAppendChild(
  
      navbar[[3]][[1]]$children[[1]], textEl)
  
    navbar
  
  }
  
  
  
  # Call this function with an input (such as `textInput("text", NULL, "Search")`) if you
  
  # want to add an input to the navbar
  
  navbarPageWithInputs &lt;- function(..., inputs) {
  
    navbar &lt;- navbarPage(...)
  
    form &lt;- tags$form(class = "navbar-form", inputs)
  
    navbar[[3]][[1]]$children[[1]] &lt;- htmltools::tagAppendChild(
  
      navbar[[3]][[1]]$children[[1]], form)
  
    navbar
  
  }
  library(shiny)
  library(DT)
  Patient_005=as.data.frame(read.table(text = "   Driver  SNV_Tumour_005  SNV_Organoid_005    INDEL_Tumour_005    INDEL_Organoid_005  Deletion_Organoid_005
                                       ABCB1   *   *   *   -   -   -
                                       ACVR1B  *   *   -   -   -   -
                                       ACVR2A  *   -   -   -   -   -
  
                                       "))
  
  Patient_013=as.data.frame(read.table(text = "   Driver  SNV_Tumour_013  SNV_Organoid_013    INDEL_Tumour_013    INDEL_Organoid_013  Deletion_Tumour_013 Deletion_Organoid_013
                                       ABCB1   *   -   *   -   -   -   -
                                       ACVR1B  *   -   -   -   -   -   -
                                       ACVR2A  *   -   -   -   -   -   -
  
                                       "))
  
  Patient_036 = as.data.frame(read.table(text = " Driver  SNV_Organoid_036    INDEL_Organoid_036  Deletion_Organoid_036
                                         ABCB1   *   -   *   -
                                         ACVR1B  *   *   *   -
                                         ACVR2A  *   *   -   -
  
                                         "))
  
  Patient_021 = as.data.frame(read.table(text = " Driver  SNV_Organoid_021    INDEL_Organoid_021
                                         ABCB1   *   *   -
                                         ACVR1B  *   *   -
                                         ACVR2A  *   *   *
  
                                         "))
  
  ui &lt;- shinyUI(navbarPage("Patients",
                           tabPanel("Table",theme = "bootstrap.css",
  
                                    headerPanel("Genomic variations in OESO driver genes"),
  
                                    sidebarPanel(br(),
                                                 tags$style("#select1 {border: 2px solid #dd4b39;}"), div(
  
                                                   id = "loading-content",
  
                                                   h2("Binary output"), navbarPageWithText(
  
                                                     "* means that gene carries an event",
  
                                                     text = "- means that no event has been observed"
  
                                                   )
  
                                                 ),
                                                 selectInput(
                                                   "table_dataset",
                                                   "Choose patient:",
                                                   choices = c("Patient_005","Patient_013","Patient_036","Patient_021")
                                                 ) 
                                    ),
                                    mainPanel(DT::dataTableOutput("table"))
                           ),
                           tabPanel("Image",
                                    sidebarPanel( br(),
                                                  tags$style("#select2 {background-color:blue;}"),
                                                  selectInput(
                                                    "image_dataset",
                                                    "Choose image:",
                                                    choices = c("Mutational_Signatures"="https://i.ibb.co/hZYc9nM/Mutational-Signatures1.png", "Total_and_Minor_Copy_Number" = "https://i.ibb.co/pRYxfwF/Total-and-Minor-Copy-Number.png", "Structural_Variations" = "https://i.ibb.co/JB4z6y6/Strutural-Variations.png", "Statistics" = "https://i.ibb.co/DYm2nm4/Statistics.png" , "Major_and_Minor_Copy_Number" = "https://i.ibb.co/ZV3DTXN/Major-and-Minor-Copy-Number.png", "Mutational_consequences_SNVs" = "https://i.ibb.co/CpyqRdr/Mutational-consequences.png" , "Mutational_consequences_INDEL" = "https://i.ibb.co/Vt4nwqd/Mutational-consequences-indel.png" , "Segment_mean" = "https://i.ibb.co/Cthk4ZD/Segment-mean.png" , "RNA_seq_Driver_Genes" = "https://i.ibb.co/qr9cvdN/RNA-seq.png"
                                                    )
                                                  ) 
                                    ),
                                    mainPanel(
                                      uiOutput("image") 
                                    ), div(
  
                                      id = "loading-content",
  
                                      h2("Loading..."), navbarPageWithText(
  
                                        "Images of",
  
                                        text = "Organoid models"
  
                                      )
  
                                    )
                           ),tags$head(
                             tags$style(type = 'text/css', 
                                        HTML('.navbar { background-color: skin-blue;}
                            .navbar-default .navbar-brand{color: black;}
                            .tab-panel{ background-color: skin-blue; color: black}
                            .navbar-default .navbar-nav &gt; .active &gt; a, 
                             .navbar-default .navbar-nav &gt; .active &gt; a:focus, 
                             .navbar-default .navbar-nav &gt; .active &gt; a:hover {
                                  color: #555;
                                  background-color: pink;
                              }')
                             )
                           )
  ))
  
  server &lt;- function(input, output) {
  
    # Related to displaying tables
    table_data &lt;- reactive({
      switch(input$table_dataset, "Patient_005" = Patient_005 ,"Patient_013" = Patient_013,"Patient_036" = Patient_036,"Patient_021" = Patient_021)
    })
  
    column_data &lt;- reactive({
      switch(input$table_dataset, 
             "Patient_005" = c('Driver','SNV_Tumour_005','SNV_Organoid_005','INDEL_Tumour_005','INDEL_Organoid_005','Deletion_Organoid_005'),
             "Patient_013" = c('SNV_Tumour_013','SNV_Organoid_013','INDEL_Tumour_013','INDEL_Organoid_013','Deletion_Tumour_013','Deletion_Organoid_013')
                               )
    })
  
    output$table &lt;- DT::renderDataTable({
      datatable(table_data()) %&gt;% 
        formatStyle(
          column_data(),
          backgroundColor = styleEqual(c("*", "-"), c('green', 'red'))
        )
    })
  
    # Related to displaying images
    output$image &lt;- renderUI({
      tags$img(src = input$image_dataset)
    })
  
  }
  
  shinyApp(ui=ui,server=server)
  </code></pre>
  
  <p>I need to add this table as another panel with the title of MetaData</p>
  
  <pre><code>    &gt; head(MetaData)
       Clinical.ID       Barcode WTSI.Model.ID Tissue.Origin
  1 OCC/SH/253/S/T 2000003422203 WTSI-OESO_005   Oesophageal
  2 OCC/SH/254/S/T    CGAP-A3F3F WTSI-OESO_013   Oesophageal
  3 OCC/SH/255/S/T    CGAP-73FED WTSI-OESO_036   Oesophageal
  4 OCC/SH/255/S/N    CGAP-70672 WTSI-OESO_037   Oesophageal
    Sample.type
  1      Tumour
  2      Tumour
  3      Tumour
  4      Normal
  &gt; 
  
  
  
  &gt; dput(head(MetaData))
  structure(list(Clinical.ID = structure(c(1L, 2L, 4L, 3L), .Label = c("OCC/SH/253/S/T", 
  "OCC/SH/254/S/T", "OCC/SH/255/S/N", "OCC/SH/255/S/T"), class = "factor"), 
      Barcode = structure(c(1L, 4L, 3L, 2L), .Label = c("2000003422203", 
      "CGAP-70672", "CGAP-73FED", "CGAP-A3F3F"), class = "factor"), 
      WTSI.Model.ID = structure(1:4, .Label = c("WTSI-OESO_005", 
      "WTSI-OESO_013", "WTSI-OESO_036", "WTSI-OESO_037"), class = "factor"), 
      Tissue.Origin = structure(c(1L, 1L, 1L, 1L), .Label = "Oesophageal", class = "factor"), 
      Sample.type = structure(c(2L, 2L, 2L, 1L), .Label = c("Normal", 
      "Tumour"), class = "factor")), row.names = c(NA, 4L), class = "data.frame")
  &gt; 
  </code></pre>
  
  <p>Could you please give me a hand in adding this table as the third panel to my app?</p>