-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
78 lines (68 loc) · 2.02 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
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library(ggvis)
library(AER)
data("CASchools")
shinyUI(fluidPage(
includeCSS("http://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.min.css"),
includeCSS("github_fork.css"),
includeHTML("github_fork.html"),
# Application title
fluidRow(
column(width = 1),
column(width = 11,
titlePanel("Linear Regression")
)
),
h4("California Test Score Dataset", align = "center"),
fluidRow(
column(width = 7,
ggvisOutput('plot')),
column(width = 5,
align = "right",
tableOutput("coefficients"),
fluidRow(
column(width = 8,
align = "right",
tableOutput("r_squared"),
ggvisOutput('tdist_plot')
),
column(width = 4,
align = "right",
tableOutput("residuals")
)
),
ggvisOutput('pvalue_plot')
)
),
hr(),
fluidRow(
column(width = 3,
sliderInput('sample_size', 'Sample Size',
min = 2,
max = nrow(CASchools),
value = 10,
step = 5,
animate = animationOptions(interval = 200))
),
column(width = 2,
actionButton("resample", label = "Resample", icon = icon("refresh"))
),
column(width = 4,
sliderInput('confidence_interval', 'Confidence Interval (%)',
min = 0,
max = 99.9,
value = 95,
step = 0.1)
),
column(width = 2,
checkboxGroupInput("show_residuals", label = "Show Residuals",
choices = list("Lines" = 1, "Values" = 2),
selected = 1)
)
)
))