-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
38 lines (31 loc) · 1.15 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
library(shiny)
# Training set
TrainSet <- read.csv("training.csv", header = TRUE)
TrainSet <- TrainSet[,-1]
pageWithSidebar(
# Page header
headerPanel('Iris Predictor'),
# Input values
sidebarPanel(
HTML("<h3>Input parameters</h4>"),
sliderInput("Sepal.Length", label = "Sepal Length", value = 5.0,
min = min(TrainSet$Sepal.Length),
max = max(TrainSet$Sepal.Length)
),
sliderInput("Sepal.Width", label = "Sepal Width", value = 3.6,
min = min(TrainSet$Sepal.Width),
max = max(TrainSet$Sepal.Width)),
sliderInput("Petal.Length", label = "Petal Length", value = 1.4,
min = min(TrainSet$Petal.Length),
max = max(TrainSet$Petal.Length)),
sliderInput("Petal.Width", label = "Petal Width", value = 0.2,
min = min(TrainSet$Petal.Width),
max = max(TrainSet$Petal.Width)),
actionButton("submitbutton", "Submit", class = "btn btn-primary")
),
mainPanel(
tags$label(h3('Status/Output')), # Status/Output Text Box
verbatimTextOutput('contents'),
tableOutput('tabledata') # Prediction results table
)
)