-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui.R
67 lines (54 loc) · 2.05 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
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# AHA CV Risk Calculator
# http://my.americanheart.org/professional/StatementsGuidelines/
# PreventionGuidelines/Prevention-Guidelines_UCM_457698_SubHomePage.jsp
# downloaded 2013-11-18 @ 21:45
# @ericpgreen
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This file is not intended to replace the AHA CV Risk Calculator or be used in
# a clincal context. The only purpose is to explore alternate forms of data
# visualization.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
library(shiny)
library(markdown)
# Define UI
shinyUI(pageWithSidebar(
# Application title
headerPanel("Statin"),
sidebarPanel(
# gender
selectInput("gender", "Gender:",
choices = c("Male", "Female")),
# age
sliderInput("age", "Age:",
min=20, max=79, value=50),
# race
selectInput("race", "Race:",
choices = c("African American", "White")),
# total cholesterol
sliderInput("cholesterol", "Total Cholesterol:",
min=130, max=320, value=170),
# hdl cholesterol
sliderInput("hdl", "HDL-Cholesterol:",
min=20, max=100, value=50),
# systolic blood pressure
sliderInput("sbp", "Systolic Blood Pressure:",
min=90, max=200, value=110),
# treatment for high blood pressure
selectInput("treatment", "Treatment for High Blood Pressure:",
choices = c("Yes", "No")),
# diabetes
selectInput("diabetes", "Diabetes:",
choices = c("Yes", "No")),
# smoker
selectInput("smoker", "Smoker:",
choices = c("Yes", "No"))
),
# plot
mainPanel(
tabsetPanel(
tabPanel("Plot", plotOutput("riskPlot")),
tabPanel("About", uiOutput("readme"))
)
)
))