Skip to content

Instantly share code, notes, and snippets.

@aagarw30
Last active February 2, 2018 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aagarw30/defc8576ab5d572ba2c4275706360ece to your computer and use it in GitHub Desktop.
Save aagarw30/defc8576ab5d572ba2c4275706360ece to your computer and use it in GitHub Desktop.
navlistPanel example with tasetPanel - dataset not showing up
library(shiny)
shinyServer(function(input, output, session) {
output$table1 <- renderTable({
mtcars
})
output$summary1 <- renderText({
summary(mtcars)
})
})
library(shiny)
library(datasets)
shinyUI(fluidPage(
titlePanel("Demo navlist panel navigation layout in shiny"),
navlistPanel(
"Data",
tabPanel("About", h3("This is the first tab or page")),
tabPanel("Data Table", tableOutput("table1"), h3("This is the first tab or page")),
tabPanel("Data Summary", verbatimTextOutput("summary1")),
"Tabsets",
tabPanel("Tabsets",
tabsetPanel(tabPanel("Plot", plotOutput("plot")),
tabPanel("Summary", verbatimTextOutput("summary")),
tabPanel("Table", tableOutput("table")))
),
"Plots",
tabPanel("Scatter Plot",h3("Can have widgets and plots")),
tabPanel("Histogram",sliderInput("bins", "bins", min=5, value=15, max=25),tableOutput("table"))
)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment