title: How to render UI from separte ui-xxx-xxx.R file
body: <p>I'm using 2 file method to create an R shiny APP. I have created a navbar in file ui.R. On tab click I want to load another UI from the file. below is the code.</p>
  
  <h1>Define UI for application</h1>
  
  <p>UI.R</p>
  
  <pre><code>ui &lt;- fluidPage(
    #app title
    navbarPage("KM Plot",id="navpage",
               tabPanel("Home",id = "homePage"),
               tabPanel("UploadFile",uiOutput("uploadpage")),
               tabPanel("About",id = "aboutPage"),
               tabPanel("ContactUs",id = "contactusPage"),
               theme = "css/bootstrap.grid.css"
    ),
    tags$h1("KM-PLOT")
  )
  </code></pre>
  
  <p>Server.R</p>
  
  <pre><code>#define server for application
  server &lt;- function(input,output)
  {
      # observe(input$navpage,
      #          {
      #            print("tab bar clicked")
      #          }
      # )
    #load the page with tab clicked 
    output$uploadpage&lt;-renderUI("ui-tab-uploadpage.R")
  }
  </code></pre>
  
  <p>ui-tab-uploadpage.R</p>
  
  <pre><code>ui&lt;-fluidPage()
  {
    titlePanel("upload files")
    tagList(
      sliderInput("n", "N", 1, 1000, 500),
      textInput("label", "Label")
    )
  }
  </code></pre>
  
  <p>I tried to find an answer for it but was unsuccessful. Need help on this </p>
  
  <p>Thank you </p>