From c38da1266db8a99fcdf8925b6775b5933401d2f9 Mon Sep 17 00:00:00 2001 From: thierrychambert <thierry.chambert@gmail.com> Date: Fri, 13 Aug 2021 11:01:59 +0200 Subject: [PATCH] matrix cleaning --- inst/ShinyApp/server.R | 2 +- inst/ShinyApp/ui.R | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inst/ShinyApp/server.R b/inst/ShinyApp/server.R index 6ef25c7..f2b2147 100644 --- a/inst/ShinyApp/server.R +++ b/inst/ShinyApp/server.R @@ -614,7 +614,7 @@ server <- function(input, output, session){ init_cumul_new <- rep(init_cumul_add, nrow) updateMatrixInput(session, inputId = "fatalities_mat_cumulated", - value = matrix(init_cumul_new, nrow = nrow, 3, byrow = TRUE, + value = matrix(init_cumul_new, nrow = nrow, ncol = 3, byrow = TRUE, dimnames = list(number_parks, c("Moyenne", "Erreur-type", diff --git a/inst/ShinyApp/ui.R b/inst/ShinyApp/ui.R index ae81a02..660787e 100644 --- a/inst/ShinyApp/ui.R +++ b/inst/ShinyApp/ui.R @@ -177,7 +177,7 @@ ui <- fluidPage( # Matrix for expert elicitation matrixInput(inputId = "fatalities_mat_expert", - value = matrix(data = eli_fatalities, 4, 5, + value = matrix(data = eli_fatalities, nrow = 4, ncol = 5, dimnames = list(c("#1", "#2", "#3", "#4"), c("Poids", "Min", "Best", "Max", "% IC" )), byrow = TRUE), @@ -232,7 +232,7 @@ ui <- fluidPage( min = 0, max = Inf, step = 1), matrixInput(inputId = "pop_size_mat_expert", - value = matrix(data = eli_pop_size, 4, 5, + value = matrix(data = eli_pop_size, nrow = 4, ncol = 5, dimnames = list(c("#1", "#2", "#3", "#4"), c("Poids", "Min", "Best", "Max", "% IC" )), byrow = TRUE), @@ -262,7 +262,7 @@ ui <- fluidPage( min = 0, max = Inf, step = 100), matrixInput(inputId = "carrying_cap_mat_expert", - value = matrix(data = eli_carrying_cap, 4, 5, + value = matrix(data = eli_carrying_cap, nrow = 4, ncol = 5, dimnames = list(c("#1", "#2", "#3", "#4"), c("Poids", "Min", "Best", "Max", "% IC" )), byrow = TRUE), @@ -297,7 +297,7 @@ ui <- fluidPage( min = 0, max = Inf, step = 0.01), matrixInput(inputId = "pop_growth_mat_expert", - value = matrix(data = eli_pop_growth, 4, 5, + value = matrix(data = eli_pop_growth, nrow = 4, ncol = 5, dimnames = list(c("#1", "#2", "#3", "#4"), c("Poids", "Min", "Best", "Max", "% IC" )), byrow = TRUE), -- GitLab