From 3c43fd1e2377929fad24580be645ad01732f3667 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 8 Oct 2023 13:01:40 +0200 Subject: [PATCH] fix issue in printing --- R/print.equivalence_test.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/print.equivalence_test.R b/R/print.equivalence_test.R index 11bf4b80b..0201d2f71 100644 --- a/R/print.equivalence_test.R +++ b/R/print.equivalence_test.R @@ -11,7 +11,12 @@ print.equivalence_test <- function(x, digits = 2, ...) { if (!is.null(cp$Group) && any(startsWith(cp$Group, "SD/Cor"))) { cp <- cp[startsWith(cp$Group, "SD/Cor"), ] matches <- match(cp$Parameter, x$Parameter) - if (length(matches)) x$Parameter[matches] <- paste0("SD/Cor: ", cp$Cleaned_Parameter[stats::na.omit(match(x$Parameter, cp$Parameter))]) + if (length(matches)) { + x$Parameter[matches] <- paste0( + "SD/Cor: ", + cp$Cleaned_Parameter[unique(stats::na.omit(match(x$Parameter, cp$Parameter)))] + ) + } } }