From 62e86c324cbc991b041bb26ae144ff64794f3d5b Mon Sep 17 00:00:00 2001 From: Witold Wolski Date: Mon, 27 May 2024 22:20:33 +0200 Subject: [PATCH] Warn when warning. --- R/tidyMS_R6_Modelling.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tidyMS_R6_Modelling.R b/R/tidyMS_R6_Modelling.R index a71ea5f4..c3c049e6 100644 --- a/R/tidyMS_R6_Modelling.R +++ b/R/tidyMS_R6_Modelling.R @@ -535,7 +535,7 @@ linfct_matrix_contrasts <- function(linfct , contrasts, p.message = FALSE){ tryCatch({ data <- dplyr::mutate(data, !!names(contrasts)[i] := !!rlang::parse_expr(contrasts[i])) }, error = function(e) { - warning("Error:", e$message, "\n") + warning("Warn 'linfct_matrix_contrasts':", e$message, "\n") # Handle the error, e.g., by skipping the current iteration, logging the error, etc. }) }