Skip to content

Instantly share code, notes, and snippets.

@aagarw30
Created February 1, 2018 07:09
Show Gist options
  • Save aagarw30/f475e88be226b395de9c8997c4991f1d to your computer and use it in GitHub Desktop.
Save aagarw30/f475e88be226b395de9c8997c4991f1d to your computer and use it in GitHub Desktop.
navlistPanel w/o tabsetPanel - dataset showing
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