From 65b29845dc66a3cd7d572c4ea3a7041da24c78ce Mon Sep 17 00:00:00 2001 From: Costa <47926492N@ICO.SCS.local> Date: Fri, 18 Jun 2021 09:57:44 +0200 Subject: [PATCH] Correct cut numbers selection. --- invivos/app.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/invivos/app.R b/invivos/app.R index 788a106..bf52926 100644 --- a/invivos/app.R +++ b/invivos/app.R @@ -114,12 +114,16 @@ server <- function(input, output) { }) output$lowcut<-renderUI({ if (!is.null(dades$taula)){ - sliderInput("lowcut", "Corte inferior", min=0, max=0.6, step=0.05, value=0) + cut.max<-round(max(dades$taula$Volume, na.rm = T), 2) + step<-round(max(dades$taula$Volume, na.rm = T)/20, 2) + sliderInput("lowcut", "Corte inferior", min=0, max=cut.max, step=step, value=0) } }) output$upcut<-renderUI({ if (!is.null(dades$taula)){ - sliderInput("upcut", "Corte superior", min=0, max=0.6, step=0.05, value=0.6) + cut.max<-round(max(dades$taula$Volume, na.rm = T), 2) + step<-round(max(dades$taula$Volume, na.rm = T)/20, 2) + sliderInput("upcut", "Corte superior", min=0, max=cut.max, step=step, value=cut.max) } }) output$goButton<-renderUI({