Multiple Web application R shiny

Assuming I have 2 action buttons as a starting page 'Client' & 'Employee' as shown below, and for each option, there is a different web application.
Capture

when the user clicks the 'Client' button I need the following code to be run:

library(shiny)

ui <- 
navbarPage(
  "The Client Web",
  tabPanel("Section1 "),
  tabPanel(" Section1 2")
)

server <- function(input, output,session){

}

shinyApp(ui = ui, server = server)

and when the user clicks the 'Employee' button I need the following code to be run:

library(shiny)

ui <- 
navbarPage(
  "The Employee Web",
  tabPanel("Component 1"),
  tabPanel("Component 2"),
  tabPanel("Component 3")
)

server <- function(input, output,session){

}

shinyApp(ui = ui, server = server)

I need both of the web applications in one app depending on the type of the user either 'Client' or 'Employee'. Thank you in advance!

You might use modules.
Chapter 19 Shiny modules | Mastering Shiny (mastering-shiny.org)

1 Like

Thank you very much!

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.