mainPanel
or sidebarPanel
are just a wrappers for a div tag, a sort of html container where you can put any other html valid elements.
For example, you can do this:
library(shiny)
ui <- pageWithSidebar(
# Application title
headerPanel("Hello Shiny!"),
# Sidebar with a slider input
sidebarPanel(
tabsetPanel(
tabPanel("Plot", plotOutput("plot")),
tabPanel("Summary", verbatimTextOutput("summary")),
tabPanel("Table", tableOutput("table"))
)),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
)
server <- function(input,output){}
runApp(list(ui=ui,server=server))