I am ideally trying to embed a website in my shiny app code, so that when users click "Cell Culture" under "Item 1", the google homepage shows up. I tried doing this, but my code does not work. Ideally, when the user clicks "Cell Culture" under "Item 1", Google's homepage should automatically show in the dashboard, however, if this is not possible and the user has to click a hyperlink to access google's homepage, that is fine too.
here is my code so far:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Dashboard"),
dashboardSidebar(
sidebarMenu(
menuItem("Item 1", tabName = "Item 1", icon = icon("medicine"),
menuSubItem("Cell Culture",
list(ui = fluidPage(
uiOutput("tab")))),
menuSubItem("Isolation"),
menuSubItem("Drug Substance"),
menuSubItem("Drug Product")),
menuItem("Item 2", tabName = "Item 2", icon = icon("medicine"),
menuSubItem("Cell Culture"),
menuSubItem("Isolation"),
menuSubItem("Drug Substance"),
menuSubItem("Drug Product"))
)
),
dashboardBody())
server = function(input, output, session){
url <- a("Google Homepage", href="https://www.google.com/")
output$tab <- renderUI({
tagList("URL link:", url)
})
}
shinyApp(ui, server)