Skip to content

Instantly share code, notes, and snippets.

@aagarw30
Created March 11, 2018 11:12
Show Gist options
  • Save aagarw30/e49696b013931015a805392288056f50 to your computer and use it in GitHub Desktop.
Save aagarw30/e49696b013931015a805392288056f50 to your computer and use it in GitHub Desktop.
1. Introduction to shinydashboard package - dashboardPage(), dashboardHeader(), dashboardSidebar(), dashboardBody()
library(shiny)
library(shinydashboard)
shinyServer(function(input, output, session){
}
)
## Intro shinydashboard package
## shinydashboard Basic Layout
library(shiny)
# install.packages("shinydashboard")
library(shinydashboard)
shinyUI(
dashboardPage(
dashboardHeader(title = "Demo shinydashboard package - This is header", titleWidth = 500),
# Add a title using the title argument
# Change the width of title using the titlewidth argument
# header can be disabled using the argument disable = TRUE
dashboardSidebar("This is sidebar and can have sidebarmenu items"),
# sidebar can be hidden by using the argument collapsed=TRUE
dashboardBody("This is body. Introducing shinydashboard package and demo of basic layout"
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment