forked from aagarw30/R-Shinyapp-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
31 lines (26 loc) · 986 Bytes
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
library(shiny)
# Define UI for application
shinyUI(fluidPage(
# Header or Title Panel
titlePanel(title = h4("Iris Dataset", align="center")),
sidebarLayout(
# Sidebar panel
sidebarPanel(
selectInput("var", "1. Select the variable from the iris dataset", choices =c("Sepal.Length" = 1, "Sepal.Width" = 2, "Petal.Length" = 3, "Petal.Width" = 4), selected = 1),
br(),
sliderInput("bins", "2. Select the number of BINs for histogram", min=5, max = 25, value=15),
br(),
radioButtons("color", "3. Select the colour of histogram", choices=c("Green", "Red", "Yellow"), selected ="Green")
),
# Main Panel
mainPanel(
tabsetPanel(type="tab",
tabPanel("Summary",verbatimTextOutput("sum")),
tabPanel("Structure", verbatimTextOutput("str")),
tabPanel("Data", tableOutput("data")),
tabPanel("Plot", plotOutput("myhist"))
)
)
)
)
)