forked from minsugim/a8_shinyapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
49 lines (42 loc) · 1.64 KB
/
ui.R
File metadata and controls
49 lines (42 loc) · 1.64 KB
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
library(shiny)
library(plotly)
shinyUI(fluidPage(
titlePanel("Let's Compare Petals and Sepals!!!"),
sidebarLayout(
# Puts two radio button widgets in the sidebar
# Choices consist of each column in the 'df' dataset
# The first widget puts a column of data into x-axis,
# the second into the y-axis. A scatter plot of their
# relationship is created.
sidebarPanel(
# Selects the column of data to be put into the x-axis
# of the scatter plot
radioButtons("adjust",
label = "X Axis",
choices = list("Sepal Length" = "Sepal.Length",
"Sepal Width" = "Sepal.Width",
"Species" = "Species"),
selected = "Sepal.Width"),
radioButtons("adjust2",
label = "Y Axis",
choices = list("Petal Length" = "Petal.Length",
"Petal Width" = "Petal.Width",
"Species" = "Species"),
selected = "Petal.Length"),
# This slider widget allows the user to change the
# size of the markers on the scatter plot. Increments
# the sizes by 0.5 each time
sliderInput("adjust3",
"Size of Markers",
min = 1,
max = 15,
value = 6,
step = 0.5)
),
# Creates the plotly scatter plot in the main panel
mainPanel(
plotlyOutput('scatter')
)
)
)
)