From d0a64a3d4ef06768ab4ab10875e8a2feacbe8f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Todor=20Kondi=C4=87?= <todor.kondic@uni.lu> Date: Wed, 18 Mar 2020 22:27:08 +0100 Subject: [PATCH] Clearer duplicates error --- R/mix.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/R/mix.R b/R/mix.R index f99372e..4834d69 100644 --- a/R/mix.R +++ b/R/mix.R @@ -496,9 +496,13 @@ getEntryFromComp<-function(entry,id,set,mode,compTab) { res<- if (length(ind)==1) compTab[ind,entry] else { if (length(ind)>1) { - stop("Nonunique entry selection in comprehensive table.") + warning("Nonunique selection in comprehensive table:") + for (i in ind) { + message('ID: ',compTab$ID[[i]],' set: ',compTab$set[[i]],' mode: ',compTab$mode[[i]]) + } + warning("The compound set table likely containes duplicate IDs per set/mode combination. Please correct this.") } else { - stop("Entries not found for id ", id,"set ",set, "and mode ", mode, " .") + warning("Entries not found for id ", id,"set ",set, "and mode ", mode, " .") } } res -- GitLab