From c02219b6fbccae5f5abbdc7f883cea5f5534344b Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 8 Oct 2023 13:02:37 +0200 Subject: [PATCH] more stable --- R/print.equivalence_test.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/print.equivalence_test.R b/R/print.equivalence_test.R index 0201d2f71..e9413ddf6 100644 --- a/R/print.equivalence_test.R +++ b/R/print.equivalence_test.R @@ -12,10 +12,13 @@ print.equivalence_test <- function(x, digits = 2, ...) { cp <- cp[startsWith(cp$Group, "SD/Cor"), ] matches <- match(cp$Parameter, x$Parameter) if (length(matches)) { - x$Parameter[matches] <- paste0( + new_pattern <- paste0( "SD/Cor: ", cp$Cleaned_Parameter[unique(stats::na.omit(match(x$Parameter, cp$Parameter)))] ) + if (length(new_pattern) == length(matches)) { + x$Parameter[matches] <- new_pattern + } } } }