From 8ddcb1a960cbe3872549471eae578ac1c505f1ae Mon Sep 17 00:00:00 2001 From: Waschoi <34303168+Waschoi@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:44:20 +0100 Subject: [PATCH] Update labels.R fix for https://github.com/gdemin/expss/issues/107 duplicated values in labels: --- R/labels.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/labels.R b/R/labels.R index a4d8d0f..828466c 100644 --- a/R/labels.R +++ b/R/labels.R @@ -355,7 +355,7 @@ set_val_lab.default = function(x, value, add = FALSE){ warning("You are trying to put value labels on factor. It can lead to unexpected results. Factor will be converted to character.") } !is.null(names(value)) || stop("'set_val_lab' - labels should be named vector.") - !anyDuplicated(value) || stop("'set_val_lab' - duplicated values in labels: ",paste(value[duplicated(value)],collapse=" ")) + #!anyDuplicated(value) || stop("'set_val_lab' - duplicated values in labels: ",paste(value[duplicated(value)],collapse=" ")) # this conversion is needed to avoid strange bug (incorrect residuals) # with 'lm' with labelled integers