|
|
@@ -163,6 +163,31 @@ server <- function(input, output, session) |
|
|
|
axis.ticks.y = element_blank()) |
|
|
|
}) |
|
|
|
|
|
|
|
# Age |
|
|
|
data_age <- reactive({ |
|
|
|
if (input$choice_ghm %>% is.null) |
|
|
|
{ |
|
|
|
GHM %>% |
|
|
|
filter(Sexe %in% input$check_sexe, |
|
|
|
date_entree <= input$slider_date[2] & date_sortie >= input$slider_date[1], |
|
|
|
CP %in% in_bounds()$Codepos) |
|
|
|
} else |
|
|
|
{ |
|
|
|
GHM %>% |
|
|
|
filter(Sexe %in% input$check_sexe, |
|
|
|
GHM %in% input$choice_ghm, |
|
|
|
date_entree <= input$slider_date[2] & date_sortie >= input$slider_date[1], |
|
|
|
CP %in% in_bounds()$Codepos) |
|
|
|
} |
|
|
|
}) |
|
|
|
output$plot_age <- renderPlot({ |
|
|
|
data_age() %>% |
|
|
|
ggplot() + |
|
|
|
aes(x = Age) + |
|
|
|
geom_histogram() + |
|
|
|
scale_x_continuous(limits = c(min_age, max_age)) + |
|
|
|
theme(axis.title = element_blank()) |
|
|
|
}) |
|
|
|
# pal <- colorpal() |
|
|
|
# proxy %>% addLegend(position = "bottomright", |
|
|
|
# pal = pal, values = ~mag |
|
|
|