Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephanie Wegscheidl
cocoVisR
Commits
043f6b13
Commit
043f6b13
authored
Jul 20, 2018
by
Stephanie
Browse files
now working settup
parent
2df58055
Changes
4
Hide whitespace changes
Inline
Side-by-side
dashboard/server.R
View file @
043f6b13
...
...
@@ -9,21 +9,6 @@
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'
)
})
server
<-
function
(
input
,
output
)
{
set.seed
(
122
)
}
)
dashboard/ui.R
View file @
043f6b13
...
...
@@ -3,7 +3,7 @@ library(shiny)
library
(
shinydashboard
)
library
(
leaflet
)
ui
<-
dashboardPage
(
ui
<-
dashboardPage
(
dashboardHeader
(
title
=
"CoCoVisR"
),
dashboardSidebar
(
sidebarMenu
(
...
...
@@ -30,9 +30,8 @@ ui<-dashboardPage(
h2
(
"This is the Dashboard"
),
fluidRow
(
box
(
title
=
"Histogram"
,
#background="maroon
",
status
=
"primary
"
,
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
plotOutput
(
"plot1"
,
height
=
250
)),
box
(
title
=
"Map"
,
...
...
@@ -40,8 +39,14 @@ ui<-dashboardPage(
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
plotOutput
(
"plot1"
,
height
=
250
)),
box
(
plotOutput
(
"plot3"
,
height
=
250
)),
box
(
plotOutput
(
"plot4"
,
height
=
250
))
box
(
title
=
"Timeline"
,
status
=
"primary"
,
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
plotOutput
(
"plot3"
,
height
=
250
)),
box
(
title
=
"Linechart"
,
status
=
"primary"
,
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
plotOutput
(
"plot4"
,
height
=
250
))
#box(
# title = "Controls",
#sliderInput("slider", "Number of observations:", 1, 100, 50)
...
...
@@ -58,9 +63,9 @@ ui<-dashboardPage(
))
)
server
<-
function
(
input
,
output
)
{
set.seed
(
122
)
histdata
<-
rnorm
(
500
)
#
server <- function(input, output) {
#
set.seed(122)
#
histdata <- rnorm(500)
#output$plot1 <- renderPlot({
#data <- histdata[seq_len(input$slider)]
...
...
@@ -76,5 +81,5 @@ server <- function(input, output) {
#m <- addMarkers(m,lng=longitude[x], lat=latitude[x]) #addPolylines does not work
#x=x+1}
#m
}
shinyApp
(
ui
,
server
)
#
}
#
shinyApp(ui,
server)
import/try/server.R
deleted
100644 → 0
View file @
2df58055
#
# 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
server
(
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'
)
})
})
import/try/ui.R
deleted
100644 → 0
View file @
2df58055
#
# 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
(
fillPage
(
# 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