-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
66 lines (35 loc) · 1.84 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
library(markdown)
ess.ch <- read.table("http://www.paulcbauer.eu/wp-content/uploads/2014/11/ess_ch.txt", header=TRUE, sep=",")
shinyUI(fluidPage(
titlePanel("Discrete joint distributions"),
sidebarLayout(
sidebarPanel(
selectInput("var1", label = "Y-Variable:",
choices = c("trust.police", "trust.politicians", "political.interest",
"voted.last.election", "party.voted.last", "swiss.citizen",
"happy", "health", "age", "hh.income"), selected = "voted.last.election"),
selectInput("var2", label = "X-Variable:",
choices = c("trust.police", "trust.politicians", "political.interest",
"voted.last.election", "party.voted.last", "swiss.citizen",
"happy", "health", "age", "hh.income"), selected = "political.interest"),
sliderInput("x.scale", label = "Tip plot:",
min = -100, max = 100, value = -67, step = 1),
sliderInput("z.scale", label = "Turn plot:",
min = -100, max = 100, value = -31, step = 1),
br(), br(),
div("Shiny app by",
a(href="http://paulcbauer.eu/",target="_blank",
"Paul C. Bauer"),align="right", style = "font-size: 8pt"),
div("Shiny/R code:",
a(href="https://github.com/paulbauer/discrete_joint_distributions",
target="_blank","GitHub"),align="right", style = "font-size: 8pt")
),
mainPanel(
tabsetPanel(type = "tabs",
tabPanel("Plot", plotOutput("plot"), verbatimTextOutput("frequency"), verbatimTextOutput("relfrequency")),
tabPanel("Instructions", includeMarkdown("instruction.md")),
tabPanel("About", includeMarkdown("about.md"))
)
)
)
))