-
Notifications
You must be signed in to change notification settings - Fork 7
/
ui.R
53 lines (47 loc) · 1.34 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(plotly)
my.ui <- navbarPage(
# Application title
"In Class Survey Data",
# Sidebar with a slider input for number of bins
tabPanel("ScatterPlot",
sidebarLayout(
sidebarPanel(
sliderInput("hours",
"Minimum number of hours:",
min = 0,
max = 24,
value = 4)
),
# Show a plot of the generated distribution
mainPanel(
plotlyOutput("distPlot")
)
)
),
tabPanel("Histogram",
sidebarLayout(
sidebarPanel(
selectInput('hist.var', "What do you want to histogram?",
choices = list("How much sleep?" = "sleep",
"Which type of pet?" = "pet"
)
)
),
# Show a plot of the generated distribution
mainPanel(
plotlyOutput("histPlot")
)
)
)
)
# Define UI for application that draws a histogram
shinyUI(my.ui)