-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.R
More file actions
38 lines (29 loc) · 913 Bytes
/
server.R
File metadata and controls
38 lines (29 loc) · 913 Bytes
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
shinyServer(function(input, output,session) {
output$idchoices = renderUI({
if(is.null(act)){return()}
selectInput("ID", label = "ID", choices = unique(act$ID))
})
output$daychoices = renderUI({
if(is.null(act)){return()}
selectInput("Dates", label = "Dates", choices = act$Date[which(act$ID == input$ID)],multiple = T)
})
plotCount <- reactive({
as.numeric(length(input$Dates))
})
plotHeight <- reactive(250 * plotCount())
output$plot <- renderPlot({
if(is.null(act)){return()}
plot_profile(act = act , flag = flag,
id = input$ID, dates = input$Dates)
})
observeEvent(input$goplot,{
output$plot.ui <- renderUI({
plotOutput("plot", height = plotHeight())
})
})
observeEvent(input$reset,{
output$plot.ui <- NULL
# updateSelectInput(session, "ID")
# updateSelectInput(session, "Dates")
})
})