Last active
December 6, 2015 16:41
-
-
Save dmpe/0ed922e7ee079f6a1aa8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(shinydashboard) | |
header <- dashboardHeader(title = "Dashboard Demo") | |
body <- dashboardBody() | |
server <- function(input, output) { | |
} | |
sidebar <- dashboardSidebar( | |
sidebarSearchForm(label = "Enter a number", "searchText", "searchButton"), | |
sidebarMenu( | |
# Setting id makes input$tabs give the tabName of currently-selected tab | |
id = "tabs", | |
menuItem( | |
"Dashboard", | |
tabName = "dashboard", | |
icon = icon("dashboard") | |
), | |
menuItem( | |
"Widgets", | |
icon = icon("th"), | |
tabName = "widgets", | |
badgeLabel = "new", | |
badgeColor = "green" | |
), | |
menuItem( | |
"Charts", | |
icon = icon("bar-chart-o"), | |
menuSubItem("Sub-item 1", tabName = "subitem1"), | |
menuSubItem("Sub-item 2", tabName = "subitem2") | |
), | |
menuItem( | |
"test stack", | |
icon = icon("fa fa-user-plus") | |
) | |
), | |
sidebarMenuOutput("menu") | |
) | |
ui <- dashboardPage(header, | |
sidebar, | |
body) | |
shinyApp(ui, server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment