From 73fd355bdb67dbb2c45ed0ba6055e3c39d393b02 Mon Sep 17 00:00:00 2001 From: JTPetter <61797391+JTPetter@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:58:10 +0200 Subject: [PATCH] fix unit tests --- R/rareEventCharts.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/rareEventCharts.R b/R/rareEventCharts.R index f180f67c..7df78121 100644 --- a/R/rareEventCharts.R +++ b/R/rareEventCharts.R @@ -108,7 +108,7 @@ rareEventCharts <- function(jaspResults, dataset, options) { } # if intervals contains any negative values, throw error - if (any(intervals < 0)) { + if (any(intervals < 0, na.rm = TRUE)) { errorPlot <- createJaspPlot(title = gettext("Rare event charts"), width = 1200, height = 500) errorPlot$dependOn(c("variable", "stage", "dataType", "dataTypeDatesStructure", "dataTypeDatesFormatDate", "dataTypeDatesFormatTime", "dataTypeIntervalType", "dataTypeIntervalTimeFormat"))