Q:

How to call an App from within an App in Shiny

I have a Shiny apps directory that looks like this:
-- ShinyApps
     |
     |_ base_app
     |_ my_sub_app

And in base_app I have the following code:
# app. R

#-----------
# Server Section
#-----------
server <- function(input, output) { }

#-----------
# UI section
#-----------

ui <- fixedPage(

  h1("My head"),
  br(),

  br(),

  fluidRow(

      column(6,
             wellPanel(
               h3("AMAZON"),
               hr(),
               a("Go", class = "btn btn-primary btn-md", 
                 href = "http://www.amazon.com")
             )),

      column(6,
             wellPanel(
               h3("My Sub App"),
               hr(),
               a("Go", class = "btn btn-primary btn-md")
               # What should I do here to include My_SUB_APP
             ))

    )

)

shinyApp(ui = ui, server = server)

Which looks like this:

What I want to do, is when click on Go button under My SubApp panel, it
will launch sub_app() How can I do it? 
I don't want to pass URL (e.g. via href)

A:

Okay, after further analysis this is technically possible. 
(But a link solution with href is almost certainly better, the issue is that Shiny Server, or RStudio Connect, or whatever product you are using to host the app needs to have the app loaded already in order to access it, so why not just link to where it's hosting it?)  
This solution does not have the obvious "load this directory" workflow and involves specifically loading server. R and ui. R files
In order to overwrite the current UI and server, you need to literally overwrite the ui and server. 
Overwriting the ui is easy, you just render the entire thing on the server side from the beginning, and then swap the ui when they decide to press the button. 
Overwriting the server is a matter of evaluating the server function of the subAPP, (Which may absolutely have namespace collisions, but for a simple app maybe it's possible)
Here's an example of a way to do it. 
app. R file:
#-----------
# UI section
#-----------

ui1 <- fixedPage(

  h1("My head"),
  br(),

  br(),

  fluidRow(

    column(6,
           wellPanel(
             h3("AMAZON"),
             hr(),
             a("Go", class = "btn btn-primary btn-md", 
               href = "http://www.amazon.com")
           )),

    column(6,
           wellPanel(
             h3("My Sub App"),
             hr(),
             a("Go", 

               # Link button to input$SubApp1
               id = 'SubApp1', 
               class = "btn btn-primary btn-md action-button")

           ))

  )
)

appUI <- parse(file = 'subdir/ui. R')
appServer <- eval(parse(file = 'subdir/server. R'))

#-----------
# Server Section
#-----------
server <- function(input, output, session) { 
  output[['fullPage']] <- renderUI({

    if(!is.null(input$SubApp1) && input$SubApp1 > 0) {
      # If they pressed the button once,
      # run the appServer function and evaluate the parsed appUI code
      appServer(input, output, session)
      eval(appUI)
    } else {
      # 
      ui1
    }
  })
}

ui <- uiOutput('fullPage')

shinyApp(ui = ui, server = server)

subdir/ui. R (Example) :
page <- 
  navbarPage("X-men",id = "navibar",
             tabPanel("placeholder"),
             tabPanel("Plot",value = "plot"),
             selected = "plot"
  )
page[[3]][[1]]$children[[1]]$children[[2]]$children[[1]] <- 
  tags$li(tags$a(
    href = 'http://google.com', 
    icon("home", lib = "glyphicon") 
  )
  )
page

subdir/server. R (Example) :
function(input, output, session) {

}

