-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
90 lines (84 loc) · 4.38 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
ui = navbarPage("Using rdiversity",
# Tab 1 - Custom
tabPanel("Custom",
sidebarLayout(
sidebarPanel(
radioButtons("customLevel",
label = "Level",
c("Subcommunity", "Metacommunity", "Both")),
radioButtons("customMeasure",
label = "Measure",
c("Normalised alpha",
"Raw alpha",
"Normalised beta",
"Raw beta",
"Normalised rho",
"Raw rho",
"Gamma"))
, width = 3),
mainPanel(
plotOutput("customPlot"),
rHandsontableOutput('toydata'),
actionButton("customButton","Refresh plot")
)
)),
# Tab 2 - Plot
tabPanel("Plot",
sidebarLayout(
sidebarPanel(
helpText("Select a dataset."),
selectInput("plotDat", "Choose a population:",
choices = c("toy",
"BCI"),
selected = "toy"),
radioButtons("plotLevel",
label = "Level",
c("Subcommunity", "Metacommunity", "Both")),
radioButtons("plotMeasure",
label = "Measure",
c("Normalised alpha",
"Raw alpha",
"Normalised beta",
"Raw beta",
"Normalised rho",
"Raw rho",
"Gamma"))
, width = 3),
mainPanel(
textOutput("selected_var"),
plotOutput("linePlot")
)
)),
# Tab 3 - What is diversity?
tabPanel("What is diversity?",
sidebarLayout(position="left",
sidebarPanel(
radioButtons("divtype",
label = "divtype",
c("Alpha", "Beta", "Gamma"))),
mainPanel(htmlOutput("whatisdiv")))
),
# Tab 4 - What is q?
tabPanel("What is q?", mainPanel(verbatimTextOutput("whatisq"))),
# Tab 5 - Datasets
tabPanel("Datasets",
# each tab can have it's own layout
sidebarLayout(
sidebarPanel(
selectInput("dataset", "Choose a population:",
choices = c("true",
"one",
"uneven",
"mixed",
"even",
"random",
"random 50")),
actionButton("update", "Update View")
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("diversityPlot")
)
)
)
)