Browse Source

Plot age

master
Maxime Wack 7 years ago
parent
commit
0ce65c8c17
1 changed files with 25 additions and 0 deletions
  1. +25
    -0
      app.R

+ 25
- 0
app.R View File

@@ -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


Loading…
Cancel
Save