From 923ecf4d838a52895d46c4de7369efb578e22a41 Mon Sep 17 00:00:00 2001 From: dmattek Date: Mon, 30 Apr 2018 14:14:08 +0200 Subject: [PATCH] llow for missing diata when calculating quantiles for outliers --- server.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.R b/server.R index 693ee97..b477f9e 100644 --- a/server.R +++ b/server.R @@ -694,8 +694,8 @@ shinyServer(function(input, output, session) { if (input$chBoutliers) { loc.out[, y.sc := scale(y)] - loc.tmp = loc.out[ y.sc < quantile(y.sc, (1 - input$slOutliersPerc * 0.01)*0.5) | - y.sc > quantile(y.sc, 1 - (1 - input$slOutliersPerc * 0.01)*0.5)] + loc.tmp = loc.out[ y.sc < quantile(y.sc, (1 - input$slOutliersPerc * 0.01)*0.5, na.rm = T) | + y.sc > quantile(y.sc, 1 - (1 - input$slOutliersPerc * 0.01)*0.5, na.rm = T)] loc.out = loc.out[!(id %in% unique(loc.tmp$id))] loc.out[, y.sc := NULL] } -- GitLab