-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
52 lines (44 loc) · 1.59 KB
/
ui.R
File metadata and controls
52 lines (44 loc) · 1.59 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
50
51
52
library(shiny)
library(datasets)
library(gridExtra)
library(xlsx)
require(ggplot2)
# Define UI for dataset viewer application
shinyUI(pageWithSidebar(
# Application title
headerPanel("Food Value on your click"),
# Sidebar with controls to select a dataset and specify the number
# of observations to view
sidebarPanel(
width = 3,
selectInput("dataset1", "Choose a Food Type:",
choices = c("RICE","BEEF","CHEESE", "BUTTER","FLOUR","OIL")),
selectInput("dataset2", " Nutrient Type 1:",
choices = c("Energy","Protein","Carbohydrate")),
selectInput("dataset3", " Nutrient Type 2:",
choices = c( "Sugar","Cholesterol","Fat")),
selectInput("dataset4", " View Type:",
choices = c("Horizontal","Vertical"))
#numericInput("obs", "Customize your observation Table:", 5)
),
# Show a summary of the dataset and an HTML table with the requested
# number of observations
#mainPanel(
# plotOutput("view"),
#verbatimTextOutput("summary")
#tableOutput("table")
# )
mainPanel(
tags$style(HTML("
.tabs-above > .nav > li[class=active] > a {
background-color: #000;
color: #FFF;
}")),
# Output: Tabset w/ plot, summary, and table ----
tabsetPanel(type = "tabs",
tabPanel("Plot", plotOutput("view")),
tabPanel("Data", tableOutput("table")),
tabPanel("Summary", verbatimTextOutput("summary"))
)
)
))