Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Charles
scoping rules
Commits
953af643
Commit
953af643
authored
Feb 19, 2021
by
Charles
Browse files
initial commit
parents
Changes
3
Hide whitespace changes
Inline
Side-by-side
global.R
0 → 100644
View file @
953af643
library
(
dplyr
)
Sys.sleep
(
30
)
library
(
tidyverse
)
server.R
0 → 100644
View file @
953af643
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library
(
shiny
)
# Define server logic required to draw a histogram
shinyServer
(
function
(
input
,
output
)
{
output
$
distPlot
<-
renderPlot
({
# generate bins based on input$bins from ui.R
x
<-
faithful
[,
2
]
bins
<-
seq
(
min
(
x
),
max
(
x
),
length.out
=
input
$
bins
+
1
)
# draw the histogram with the specified number of bins
hist
(
x
,
breaks
=
bins
,
col
=
'darkgray'
,
border
=
'white'
)
})
})
ui.R
0 → 100644
View file @
953af643
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library
(
shiny
)
# Define UI for application that draws a histogram
shinyUI
(
fluidPage
(
# Application title
titlePanel
(
"Old Faithful Geyser Data"
),
# Sidebar with a slider input for number of bins
sidebarLayout
(
sidebarPanel
(
sliderInput
(
"bins"
,
"Number of bins:"
,
min
=
1
,
max
=
50
,
value
=
30
)
),
# Show a plot of the generated distribution
mainPanel
(
plotOutput
(
"distPlot"
)
)
)
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment