From 58ca6fe63a35cadc4881ba3327e99811d3227795 Mon Sep 17 00:00:00 2001 From: Antonio Date: Thu, 22 Apr 2021 19:36:32 +0200 Subject: [PATCH] Update tracker.R Fix bug in median computation --- R/tracker.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tracker.R b/R/tracker.R index c1cea2a..6820235 100644 --- a/R/tracker.R +++ b/R/tracker.R @@ -16,9 +16,9 @@ center_around_median <- function(tracker_data) { # TODO Should we infer the min/max from the data # or rather hardcode them? min_x <- min(tracker_data$x) - max_x <- max(tracker_data$x) x <- tracker_data$x - min_x + max_x <- max(x) x <- x - max_x / 2 tracker_data$x <- x return(tracker_data)