Spaces:
Sleeping
Sleeping
Create ui.R
Browse files
ui.R
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# k-means only works with numerical variables,
|
2 |
+
# so don't give the user the option to select
|
3 |
+
# a categorical variable
|
4 |
+
vars <- setdiff(names(iris), "Species")
|
5 |
+
|
6 |
+
pageWithSidebar(
|
7 |
+
headerPanel('Iris k-means clustering'),
|
8 |
+
sidebarPanel(
|
9 |
+
selectInput('xcol', 'X Variable', vars),
|
10 |
+
selectInput('ycol', 'Y Variable', vars, selected = vars[[2]]),
|
11 |
+
numericInput('clusters', 'Cluster count', 3, min = 1, max = 9)
|
12 |
+
),
|
13 |
+
mainPanel(
|
14 |
+
plotOutput('plot1')
|
15 |
+
)
|
16 |
+
)
|