diff --git a/inst/ShinyApp/server.R b/inst/ShinyApp/server.R index 2d0a9029a8435370f0044382dedf53a1d911b8cf..974b6357b98192422583353457190fca8b823d6b 100644 --- a/inst/ShinyApp/server.R +++ b/inst/ShinyApp/server.R @@ -625,8 +625,17 @@ server <- function(input, output, session){ ################################# ## Fatalities ##------------------------------- - output$fatalities_mean_info <- renderText({ paste0("Moyenne : ", tail(param$fatalities_mean, 1)) }) - output$fatalities_se_info <- renderText({ paste0("Erreur-type : ", tail(param$fatalities_se, 1)) }) + output$fatalities_mean_info <- renderText({ + paste0(c("Moyenne : ", + paste0(c(tail(param$fatalities_mean, -1)), collapse = ", ") + ), collapse = "") + }) + + output$fatalities_se_info <- renderText({ + paste0(c("Erreur-type : ", + paste0(c(tail(param$fatalities_se, -1)), collapse = ", ") + ), collapse = "") + }) ################################# @@ -955,7 +964,7 @@ server <- function(input, output, session){ ##------------------------------------------- ## Functions to print the output as text (non cumulated impacts) print_impact_text <- function(impact, lci, uci){ - paste0("Impact sur la taille de population : ", round(impact, 2)*100, "%", + paste0("Impact : ", round(impact, 2)*100, "%", "[", round(lci, 2)*100, "% ; ", round(uci, 2)*100, "%]") } # end function print_impact_text @@ -1001,6 +1010,13 @@ server <- function(input, output, session){ } # if "run } # end function print_out + # Display title + output$title_impact_result <- renderText({ + if(input$run > 0){ + "Résultat : Impact estimé au bout de 30 ans" + } + }) + # Display result (text for non cumulated impacts) output$impact_text <- renderText({ if(input$run == 0){ diff --git a/inst/ShinyApp/ui.R b/inst/ShinyApp/ui.R index 17ea4b316566d90baf8427570950b28b9497668b..7d6801a513810118fd1ffb157371f96e10e43c3c 100644 --- a/inst/ShinyApp/ui.R +++ b/inst/ShinyApp/ui.R @@ -466,11 +466,15 @@ rm(list = ls(all.names = TRUE)) br(), + actionButton(inputId = "run", label = "Lancer l'analyse"), + hr(), + + span(textOutput("title_impact_result"), align = "left", style = "font-weight: bold; font-size: 18px;"), + br(), strong(span(textOutput("impact_text"), style="color:blue; font-size:18px", align = "left")), strong(span(tableOutput("impact_table"), style="color:blue; font-size:18px", align = "left")), br(), - actionButton(inputId = "run", label = "Lancer l'analyse"), hr(), tags$h4(textOutput("title_impact_plot"), align = "center"),